Browse Source

fix unit test

gh-pages
Maurits Lourens 5 years ago
parent
commit
de96f7384a
  1. 12
      packages/worker/src/api/routes/tests/configs.spec.js

12
packages/worker/src/api/routes/tests/configs.spec.js

@ -4,7 +4,7 @@ const setup = require("./utilities")
jest.mock("nodemailer") jest.mock("nodemailer")
const nodemailer = require("nodemailer") const nodemailer = require("nodemailer")
nodemailer.createTransport.mockReturnValue({ nodemailer.createTransport.mockReturnValue({
verify: jest.fn() verify: jest.fn(),
}) })
describe("/api/global/configs/checklist", () => { describe("/api/global/configs/checklist", () => {
@ -25,11 +25,11 @@ describe("/api/global/configs/checklist", () => {
.set(config.defaultHeaders()) .set(config.defaultHeaders())
.expect("Content-Type", /json/) .expect("Content-Type", /json/)
.expect(200) .expect(200)
const checklist = res.body const checklist = res.body
expect(checklist.apps).toBe(0) expect(checklist.apps.checked).toBeFalsy()
expect(checklist.smtp).toBe(true) expect(checklist.smtp.checked).toBeTruthy()
expect(checklist.adminUser).toBe(true) expect(checklist.adminUser.checked).toBeTruthy()
}) })
}) })

Loading…
Cancel
Save