redoc/lib/services/hash.service.spec.ts
2016-11-30 11:55:37 +02:00

22 lines
490 B
TypeScript

'use strict';
import {
inject
} from '@angular/core/testing';
import { Hash } from './hash.service';
describe('Hash Service', () => {
let hashService;
beforeEach(inject([Hash], (_hash) => {
hashService = _hash;
}));
it('should trigger changed event when method start is called', () => {
spyOn(hashService.value, 'next').and.stub();
hashService.start();
expect(hashService.value.next).toHaveBeenCalled();
hashService.value.next.and.callThrough();
});
});