Testing #82

Merged
KevinMidboe merged 8 commits from testing into master 2018-02-07 13:41:06 +00:00
2 changed files with 19 additions and 0 deletions
Showing only changes of commit bd1e3c4455 - Show all commits

File diff suppressed because one or more lines are too long

View 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))
);
});