Created
December 5, 2019 11:00
-
-
Save FunnyGhost/bcf653e7618bc5e5b31fcb5dc08897bb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| it('should delete a favorite movie when the user wants to', () => { | |
| jest.spyOn(favoriteMovieService, 'deleteMovie'); | |
| const favoriteMovieToDelete = favoriteMoviesToUse[0]; | |
| const componentToDelete = fixture.debugElement.queryAll( | |
| By.directive(FavoriteMovieComponent) | |
| )[0].componentInstance as FavoriteMovieComponent; | |
| componentToDelete.deleteMovie.emit(favoriteMovieToDelete); | |
| expect(favoriteMovieService.deleteMovie).toHaveBeenCalledWith(favoriteMovieToDelete); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment