Updated mocha & nyc, resolved all lint issues in tests/
This commit is contained in:
@@ -5,14 +5,17 @@ const resetDatabase = require("../helpers/resetDatabase");
|
||||
const createCacheEntry = require("../helpers/createCacheEntry");
|
||||
const popularMoviesSuccess = require("../fixtures/popular-movies-success-response.json");
|
||||
|
||||
describe('As a user I want to get popular movies', () => {
|
||||
before(() => resetDatabase());
|
||||
before(() => createCacheEntry('pm:1', popularMoviesSuccess));
|
||||
|
||||
it('should return 200 with the information', () =>
|
||||
request(app)
|
||||
.get('/api/v2/movie/popular')
|
||||
.expect(200)
|
||||
.then(response => assert.equal(response.body.results.length, 20))
|
||||
describe("As a user I want to get popular movies", () => {
|
||||
beforeEach(() => resetDatabase());
|
||||
beforeEach(() =>
|
||||
createCacheEntry("tmdb/miscPopularMovies:1", popularMoviesSuccess)
|
||||
);
|
||||
|
||||
it("should return 200 with the information", () =>
|
||||
request(app)
|
||||
.get("/api/v2/movie/popular")
|
||||
.expect(200)
|
||||
.then(response => {
|
||||
assert.equal(response.body?.results?.length, 20);
|
||||
}));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user