|
|
|
@ -32,8 +32,16 @@ describe('AppController', () => { |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
it('should return 404 for unknown imdb id', () => { |
|
|
|
|
expect(() => moviesController.getMovie('tt7394674')).toThrow( |
|
|
|
|
'Not Found', |
|
|
|
|
); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
it('should throw an error for empty search query', () => { |
|
|
|
|
expect(() => moviesController.searchMovies({})).toThrow(); |
|
|
|
|
expect(() => moviesController.searchMovies({})).toThrow( |
|
|
|
|
'Query should not be empty', |
|
|
|
|
); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
it('should return movies matching writer', () => { |
|
|
|
|