Skip to content

Commit b5cd4dd

Browse files
committed
chore(test): update root spec to test title (#593)
1 parent 7b26538 commit b5cd4dd

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<h1>
2-
<%= htmlComponentName %> works!
2+
{{title}}
33
</h1>

addon/ng2/blueprints/ng2/files/__path__/app/__name__.component.spec.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,12 @@ import { <%= jsComponentName %>AppComponent } from '../app/<%= htmlComponentName
1414

1515
beforeEachProviders(() => [<%= jsComponentName %>AppComponent]);
1616

17-
describe('App: <%= jsComponentName %>', () => {
18-
it('should create the app', inject([<%= jsComponentName %>AppComponent], (app: <%= jsComponentName %>AppComponent) => {
19-
expect(app).toBeTruthy();
20-
}));
21-
});
17+
describe('App: <%= jsComponentName %>', () => {
18+
it('should create the app', inject([<%= jsComponentName %>AppComponent], (app: <%= jsComponentName %>AppComponent) => {
19+
expect(app).toBeTruthy();
20+
}));
2221

22+
it('should have as title \'<%= htmlComponentName %> works!\'', inject([<%= jsComponentName %>AppComponent], (app: <%= jsComponentName %>AppComponent) => {
23+
expect(app.title).toEqual('<%= htmlComponentName %> works!');
24+
}));
25+
});

addon/ng2/blueprints/ng2/files/__path__/app/__name__.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ import { Component } from 'angular2/core';
77
styleUrls: ['<%= dasherizedModuleName %>.component.<%= styleExt %>']
88
})
99
export class <%= jsComponentName %>AppComponent {
10+
title = '<%= htmlComponentName %> works!';
1011
}

0 commit comments

Comments
 (0)