fix failing tests replace ajax with spy

This commit is contained in:
Eugenio Romano
2018-05-21 15:44:38 +01:00
parent 266ad76ad9
commit adc1d9cb95
3 changed files with 8 additions and 297 deletions

View File

@@ -79,6 +79,8 @@ describe('Like component', () => {
}));
it('should decrease the number of likes when clicked and is already liked', async(() => {
spyOn(service, 'deleteRating').and.returnValue(Observable.of('');
simulateResponseWithLikes(1);
component.likesCounter = 2;