Skip to content

Commit

Permalink
View name resolution regression tests
Browse files Browse the repository at this point in the history
Issue #5579
  • Loading branch information
briandunn committed Oct 14, 2014
1 parent 2178406 commit c914e72
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions packages/ember-handlebars/tests/helpers/view_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,33 @@ test("View lookup - 'fu'", function() {
equal(jQuery('#fu').text(), 'bro');
});

test("View lookup - 'fu' when fu is a property and a view name", function() {
var FuView = viewClass({
elementId: "fu",
template: Ember.Handlebars.compile("bro")
});

function lookupFactory(fullName) {
equal(fullName, 'view:fu');

return FuView;
}

var container = {
lookupFactory: lookupFactory
};

view = EmberView.extend({
template: Ember.Handlebars.compile("{{view 'fu'}}"),
context: {fu: 'boom!'},
container: container
}).create();

run(view, 'appendTo', '#qunit-fixture');

equal(jQuery('#fu').text(), 'bro');
});

test("View lookup - view.computed", function() {
var FuView = viewClass({
elementId: "fu",
Expand Down

0 comments on commit c914e72

Please sign in to comment.