Add projection test to zippy.spec

This commit is contained in:
Roman Hotsiy 2015-12-19 15:02:28 +02:00
parent c591f75468
commit efb2a686fd

View File

@ -51,6 +51,12 @@ describe('Zippy Component', () => {
component.type.should.be.equal('test'); component.type.should.be.equal('test');
}); });
it('project inner content', () => {
fixture.detectChanges();
let contentEl = nativeElement.querySelector('.zippy-content');
expect(contentEl).toHaveText('\n test\n ');
});
it('should open and close zippy', () => { it('should open and close zippy', () => {
fixture.detectChanges(); fixture.detectChanges();
component.empty = false; component.empty = false;
@ -91,9 +97,7 @@ describe('Zippy Component', () => {
@View({ @View({
directives: [Zippy], directives: [Zippy],
template: template:
`<zippy title="Zippy" type="test" visible="true" empty="true" (open)="open()" (close)="close()"> `<zippy title="Zippy" type="test" visible="true" empty="true" (open)="open()" (close)="close()">test</zippy>`
test
</zippy>`
}) })
class TestApp { class TestApp {
constructor() { constructor() {