Added test for checking popular shows list in tmdb.
This commit is contained in:
1
seasoned_api/test/fixtures/popular-show-success-response.json
vendored
Normal file
1
seasoned_api/test/fixtures/popular-show-success-response.json
vendored
Normal file
File diff suppressed because one or more lines are too long
18
seasoned_api/test/system/asAUserIWantToGetPopularShows.js
Normal file
18
seasoned_api/test/system/asAUserIWantToGetPopularShows.js
Normal file
@@ -0,0 +1,18 @@
|
||||
const assert = require('assert');
|
||||
const createCacheEntry = require('test/helpers/createCacheEntry');
|
||||
const resetDatabase = require('test/helpers/resetDatabase');
|
||||
const request = require('supertest-as-promised');
|
||||
const app = require('src/webserver/app');
|
||||
const popularShowsSuccess = require('test/fixtures/popular-show-success-response.json');
|
||||
|
||||
describe('As a user I want to get popular shows', () => {
|
||||
before(() => resetDatabase());
|
||||
before(() => createCacheEntry('p:show::1', popularShowsSuccess));
|
||||
|
||||
it('should return 200 with the information', () =>
|
||||
request(app)
|
||||
.get('/api/v1/tmdb/list/popular?type=show')
|
||||
.expect(200)
|
||||
.then(response => assert.equal(response.body.results.length, 20))
|
||||
);
|
||||
});
|
||||
Reference in New Issue
Block a user