Skip to content

Commit

Permalink
Merge pull request #62 from ef4/add-component-test
Browse files Browse the repository at this point in the history
Add a test for {{component}} helper
  • Loading branch information
rwjblue committed Jun 15, 2015
2 parents 4a99694 + c0d3b5c commit 480deb6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
8 changes: 4 additions & 4 deletions config/ember-try.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
module.exports = {
scenarios: [
{
name: 'ember-1.10.0',
name: 'ember-1.11.3',
dependencies: {
"ember": "1.10.0"
"ember": "1.11.3"
}
},
{
name: 'ember-1.11.1',
name: 'ember-1.12.1',
dependencies: {
"ember": "1.11.1"
"ember": "1.12.1"
}
},
{
Expand Down
9 changes: 9 additions & 0 deletions tests/test-module-for-component-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,15 @@ test('can lookup components in its layout', function() {
equal(component._state, 'inDOM');
});

test('can use the component keyword in its layout', function() {
expect(1);
var component = this.subject({
colors: ['red', 'green', 'blue'],
layout: Ember.Handlebars.compile("{{component 'x-foo'}}")
});
this.render();
equal(component._state, 'inDOM');
});

test('clears out views from test to test', function() {
expect(1);
Expand Down

0 comments on commit 480deb6

Please sign in to comment.