This is the one.

This commit is contained in:
zkldi
2021-04-18 03:08:05 +01:00
parent 870aa5840a
commit fc62580696
7 changed files with 49 additions and 6 deletions
@@ -3,10 +3,14 @@ import mockApi from "../../test-utils/mock-api";
import { TestingIIDXEamusementCSV26 } from "../../test-utils/test-data";
import { CloseAllConnections } from "../../test-utils/close-connections";
import { RequireNeutralAuthentication } from "../../test-utils/api-common";
import { CreateFakeAuthCookie } from "../../test-utils/fake-session";
import ResetDBState from "../../test-utils/reset-db-state";
t.test("POST /internal-api/import/file", (t) => {
t.test("POST /internal-api/import/file", async (t) => {
t.beforeEach(ResetDBState);
const cookie = await CreateFakeAuthCookie();
function PostImportFile() {
return mockApi.post("/internal-api/import/file");
return mockApi.post("/internal-api/import/file").set("Cookie", cookie);
}
RequireNeutralAuthentication(t, "/internal-api/import/file", "POST");