Skip to content

Commit

Permalink
add test that ensures t gets injected into components
Browse files Browse the repository at this point in the history
 #14
  • Loading branch information
pogopaule committed Dec 2, 2014
1 parent 6c2177e commit 8b61528
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/unit/initializers/t-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,15 @@ test('t gets injected into models', function() {
equal(fooModelInstance.get('foo'), 'bar');
});
});

test('t gets injected into components', function() {
var FooComponent = Ember.Component.extend({
foo: Ember.computed(function() {
return this.t('foo');
})
});
container.register('component:foo', FooComponent);

var fooComponentInstance = container.lookup('component:foo');
equal(fooComponentInstance.get('foo'), 'bar');
});

0 comments on commit 8b61528

Please sign in to comment.