Updated mocha & nyc, resolved all lint issues in tests/
This commit is contained in:
@@ -4,13 +4,14 @@ const resetDatabase = require("../helpers/resetDatabase");
|
||||
const createCacheEntry = require("../helpers/createCacheEntry");
|
||||
const interstellarQuerySuccess = require("../fixtures/interstellar-query-movie-success-response.json");
|
||||
|
||||
describe('As an anonymous user I want to search for a movie', () => {
|
||||
before(() => resetDatabase());
|
||||
before(() => createCacheEntry('mos:1:interstellar', interstellarQuerySuccess));
|
||||
|
||||
it('should return 200 with the search results even if user is not logged in', () =>
|
||||
request(app)
|
||||
.get('/api/v2/search/movie?query=interstellar&page=1')
|
||||
.expect(200)
|
||||
describe("As an anonymous user I want to search for a movie", () => {
|
||||
beforeEach(() => resetDatabase());
|
||||
beforeEach(() =>
|
||||
createCacheEntry("mos:1:interstellar", interstellarQuerySuccess)
|
||||
);
|
||||
|
||||
it("should return 200 with the search results even if user is not logged in", () =>
|
||||
request(app)
|
||||
.get("/api/v2/search/movie?query=interstellar&page=1")
|
||||
.expect(200));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user