Skip to content

Commit

Permalink
Added test for finding correct script in template query.
Browse files Browse the repository at this point in the history
  • Loading branch information
Joscha Rohmann committed Nov 7, 2015
1 parent 90db83b commit c14b099
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/spec/query/queries.js
Original file line number Diff line number Diff line change
Expand Up @@ -1031,6 +1031,20 @@
expect($('#testElement')).toHaveHtml('overrides');
});

it('grabs the script when widow does not contain the script object', function () {
setTemplate('This is evil!');

$('#testTemplate').attr('id', 'alert');

setQuery('template(alert)');
query();

expect($('#testElement')).toHaveHtml('This is evil!');

$('#alert').attr('id', 'testTemplate');

});

it('does not override content when template value is not defined', function () {
$('#testElement').html('some content');

Expand Down

0 comments on commit c14b099

Please sign in to comment.