2016-05-09 22:55:16 +03:00
|
|
|
'use strict';
|
2016-10-23 20:18:42 +03:00
|
|
|
import {
|
|
|
|
inject
|
|
|
|
} from '@angular/core/testing';
|
2016-05-09 22:55:16 +03:00
|
|
|
|
|
|
|
import { Hash } from './hash.service';
|
|
|
|
|
|
|
|
describe('Hash Service', () => {
|
|
|
|
let hashService;
|
|
|
|
|
2016-11-24 16:29:29 +03:00
|
|
|
beforeEach(inject([Hash], (_hash) => {
|
|
|
|
hashService = _hash;
|
|
|
|
}));
|
2016-05-09 22:55:16 +03:00
|
|
|
|
2017-03-30 15:17:08 +03:00
|
|
|
it('should trigger changed event when method `start` is called', () => {
|
2016-11-23 02:23:32 +03:00
|
|
|
spyOn(hashService.value, 'next').and.stub();
|
2016-11-24 16:29:29 +03:00
|
|
|
hashService.start();
|
|
|
|
expect(hashService.value.next).toHaveBeenCalled();
|
|
|
|
hashService.value.next.and.callThrough();
|
2016-05-09 22:55:16 +03:00
|
|
|
});
|
|
|
|
});
|