Select Git revision
fileformat.html
collaboration.service.spec.ts 1.02 KiB
import { CollaborationService } from './collaboration.service';
describe('CollaborationService', () => {
let service: CollaborationService;
beforeEach(() => {
service = new CollaborationService();
});
describe('is request form visible', () => {
it('should return value', (done) => {
service.showRequestForm$.next(false);
service.isRequestFormVisible().subscribe((isVisible: boolean) => {
expect(isVisible).toBeTruthy();
done();
});
service.showRequestForm();
});
});
describe('show anfrage formular', () => {
it('should set "showRequestForm" to true', () => {
service.showRequestForm$.next(false);
service.showRequestForm();
expect(service.showRequestForm$.value).toBeTruthy();
});
});
describe('hide anfrage formular', () => {
it('should set "showRequestForm" to false', () => {
service.showRequestForm$.next(true);
service.hideRequestForm();
expect(service.showRequestForm$.value).toBeFalsy();
});
});
});