Skip to content

Commit

Permalink
Merge pull request emberjs#11964 from rwjblue/update-htmlbars
Browse files Browse the repository at this point in the history
[BUGFIX beta] Update htmlbars to v0.14.2.
  • Loading branch information
rwjblue committed Aug 3, 2015
2 parents 563b2fa + d8a2bb3 commit adabda5
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"finalhandler": "^0.4.0",
"github": "^0.2.3",
"glob": "~4.3.2",
"htmlbars": "0.13.34",
"htmlbars": "0.14.2",
"qunit-extras": "^1.3.0",
"qunitjs": "^1.16.0",
"route-recognizer": "0.1.5",
Expand Down
23 changes: 23 additions & 0 deletions packages/ember-htmlbars/tests/helpers/each_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -751,6 +751,29 @@ QUnit.test('pushing a new duplicate key will render properly with primitive item
equal(view.$().text(), 'abca');
});

QUnit.test('pushing primitive item twice will render properly', function() {
runDestroy(view);
view = EmberView.create({
items: A(),
template: compile('{{#each view.items as |item|}}{{item}}{{/each}}')
});

runAppend(view);

run(function() {
view.get('items').pushObject('a');
});

equal(view.$().text(), 'a');

run(function() {
view.get('items').pushObject('a');
});

equal(view.$().text(), 'aa');
});


QUnit.test('duplicate keys work properly with objects', function() {
runDestroy(view);
let duplicateItem = { display: 'foo' };
Expand Down

0 comments on commit adabda5

Please sign in to comment.