Updated mocha & nyc, resolved all lint issues in tests/

This commit is contained in:
2022-08-20 13:05:24 +02:00
parent 9708a6cff9
commit a6d808daa6
18 changed files with 996 additions and 1207 deletions

View File

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