Angular2 test - not detecting changes
<p>I'm trying to check a dropdown is shown when a boolean is switched.
The boolean is an input on the component</p>

<pre><code>@Component({
    selector: 'dropdown',
    directives: [NgClass],
    template: `
        &lt;div [ngClass]="{open: open}"&gt;
        &lt;/div&gt;
    `,
})

export class DropdownComponent {
    @Input('open') open: boolean = false;
}
</code></pre>

<p>And the test</p>

<pre><code>it('should open', injectAsync([TestComponentBuilder], (tcb: TestComponentBuilder) =&gt; {
    return tcb.createAsync(DropdownComponent)
    .then(fixture =&gt; {
        let el = fixture.nativeElement;
        let comp: DropdownComponent = fixture.componentInstance;

        expect(el.className).toEqual('');

        comp.open = true;
        fixture.detectChanges();
        expect(el.className).toEqual('open')
    });
}));
</code></pre>

<p>I am guessing something different has to be done when the boolean is an @Input?</p>