Skip to content

Commit 7260196

Browse files
committed
Use updated this.component helper to set up component templates
1 parent 520a20d commit 7260196

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

tests/node/visit-test.js

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -51,21 +51,24 @@ QUnit.module('Ember.Application - visit() Integration Tests', function (hooks) {
5151
this.template('application', '<h1>Hello world</h1>\n{{outlet}}');
5252
this.template('a', '<h2>Welcome to {{x-foo page="A"}}</h2>');
5353
this.template('b', '<h2>{{x-foo page="B"}}</h2>');
54-
this.template('components/x-foo', 'Page {{this.page}}');
5554

5655
let initCalled = false;
5756
let didInsertElementCalled = false;
5857

59-
this.component('x-foo', {
60-
tagName: 'span',
61-
init: function () {
62-
this._super();
63-
initCalled = true;
64-
},
65-
didInsertElement: function () {
66-
didInsertElementCalled = true;
58+
this.component(
59+
'x-foo',
60+
{
61+
tagName: 'span',
62+
init: function () {
63+
this._super();
64+
initCalled = true;
65+
},
66+
didInsertElement: function () {
67+
didInsertElementCalled = true;
68+
},
6769
},
68-
});
70+
'Page {{this.page}}'
71+
);
6972

7073
let App = this.createApplication();
7174

@@ -337,8 +340,7 @@ QUnit.module('Ember.Application - visit() Integration Tests', function (hooks) {
337340

338341
QUnit.test('FastBoot: tagless components can render', function (assert) {
339342
this.template('application', "<div class='my-context'>{{my-component}}</div>");
340-
this.component('my-component', { tagName: '' });
341-
this.template('components/my-component', '<h1>hello world</h1>');
343+
this.component('my-component', { tagName: '' }, '<h1>hello world</h1>');
342344

343345
let App = this.createApplication();
344346

0 commit comments

Comments
 (0)