-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2717e01
commit 4745235
Showing
7 changed files
with
26 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,20 +8,15 @@ import { | |
mockSoftDeleteLowcalSession, | ||
mockValidateSingleSessionRequest, | ||
} from "../tests/mocks/saveAndReturnMocks"; | ||
import { CoreDomainClient } from "@opensystemslab/planx-core"; | ||
|
||
// https://docs.notifications.service.gov.uk/node.html#email-addresses | ||
const TEST_EMAIL = "[email protected]"; | ||
const SAVE_ENDPOINT = "/send-email/save"; | ||
|
||
jest.mock("@opensystemslab/planx-core", () => { | ||
return { | ||
CoreDomainClient: jest.fn().mockImplementation(() => ({ | ||
formatRawProjectTypes: jest | ||
.fn() | ||
.mockResolvedValue(["New office premises"]), | ||
})), | ||
}; | ||
}); | ||
jest | ||
.spyOn(CoreDomainClient.prototype, "formatRawProjectTypes") | ||
.mockResolvedValue("New office premises"); | ||
|
||
describe("Send Email endpoint", () => { | ||
beforeEach(() => { | ||
|
@@ -93,7 +88,7 @@ describe("Send Email endpoint", () => { | |
name: "ValidateSingleSessionRequest", | ||
data: { | ||
flows_by_pk: mockFlow, | ||
lowcal_sessions: [], | ||
lowcalSessions: [], | ||
}, | ||
}); | ||
|
||
|
@@ -258,7 +253,7 @@ describe("Setting up send email events", () => { | |
name: "ValidateSingleSessionRequest", | ||
data: { | ||
flows_by_pk: mockFlow, | ||
lowcal_sessions: [{ ...mockLowcalSession, has_user_saved: true }], | ||
lowcalSessions: [{ ...mockLowcalSession, has_user_saved: true }], | ||
}, | ||
matchOnVariables: false, | ||
}); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters