blob: 1557c88f6064221830695cf81aaf3646c26fc469 [file] [log] [blame]
/********************************************************************************
* Copyright (c) 2020 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
********************************************************************************/
import {async, ComponentFixture, TestBed} from "@angular/core/testing";
import {I18nModule} from "../../../../core/i18n/i18n.module";
import {AppNavigationFrameModule} from "../../app-navigation-frame.module";
import {DropDownMenuComponent} from "./drop-down-menu.component";
describe("DropDownMenuComponent", () => {
let component: DropDownMenuComponent;
let fixture: ComponentFixture<DropDownMenuComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [AppNavigationFrameModule, I18nModule]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(DropDownMenuComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it("should create", () => {
expect(component).toBeTruthy();
});
it("should emit log-out", async () => {
let count = 0;
const subscription = component.appLogOut.subscribe(() => count++);
component.logOut();
fixture.detectChanges();
subscription.unsubscribe();
expect(count).toEqual(1);
});
});