TASK22229: P2-S2 batch 3 migrate case/event relay GET endpoints
This commit is contained in:
@@ -2439,6 +2439,7 @@ test("getcase returns INCIDENT_ID_REQUIRED when incidentID missing", async () =>
|
||||
const mod = loadModule("pages/api/endpoint/getcase_api.js", {
|
||||
respondError: respondErrorMock,
|
||||
respondSuccess: respondSuccessMock,
|
||||
relayGet: async () => ({}),
|
||||
getToken: async () => ({ access_token: "token" }),
|
||||
hashAPIPath: () => "&hash=expected",
|
||||
azureHeaders: () => ({}),
|
||||
@@ -2459,6 +2460,8 @@ test("getcase catch path returns CASE_FETCH_FAILED", async () => {
|
||||
const mod = loadModule("pages/api/endpoint/getcase_api.js", {
|
||||
respondError: respondErrorMock,
|
||||
respondSuccess: respondSuccessMock,
|
||||
relayGet: async ({ res, errorResponse }) =>
|
||||
respondErrorMock(res, errorResponse),
|
||||
getToken: async () => ({ access_token: "token" }),
|
||||
hashAPIPath: () => "&hash=expected",
|
||||
azureHeaders: () => ({}),
|
||||
@@ -2483,6 +2486,7 @@ test("getcasebyid returns INCIDENT_ID_REQUIRED when incidentID missing", async (
|
||||
const mod = loadModule("pages/api/endpoint/getcasebyid_api.js", {
|
||||
respondError: respondErrorMock,
|
||||
respondSuccess: respondSuccessMock,
|
||||
relayGet: async () => ({}),
|
||||
getToken: async () => ({ access_token: "token" }),
|
||||
hashAPIPath: () => "&hash=expected",
|
||||
azureHeaders: () => ({}),
|
||||
@@ -2503,6 +2507,8 @@ test("getcasebyid catch path returns CASE_BY_ID_FETCH_FAILED", async () => {
|
||||
const mod = loadModule("pages/api/endpoint/getcasebyid_api.js", {
|
||||
respondError: respondErrorMock,
|
||||
respondSuccess: respondSuccessMock,
|
||||
relayGet: async ({ res, errorResponse }) =>
|
||||
respondErrorMock(res, errorResponse),
|
||||
getToken: async () => ({ access_token: "token" }),
|
||||
hashAPIPath: () => "&hash=expected",
|
||||
azureHeaders: () => ({}),
|
||||
@@ -2530,6 +2536,7 @@ test("getincidentbyid returns SEARCH_STRING_REQUIRED when searchString missing",
|
||||
const mod = loadModule("pages/api/endpoint/getincidentbyid_api.js", {
|
||||
respondError: respondErrorMock,
|
||||
respondSuccess: respondSuccessMock,
|
||||
relayGet: async () => ({}),
|
||||
getToken: async () => ({ access_token: "token" }),
|
||||
hashAPIPath: () => "&hash=expected",
|
||||
azureHeaders: () => ({}),
|
||||
@@ -2549,6 +2556,8 @@ test("getincidentbyid catch path returns INCIDENT_BY_ID_FETCH_FAILED", async ()
|
||||
const mod = loadModule("pages/api/endpoint/getincidentbyid_api.js", {
|
||||
respondError: respondErrorMock,
|
||||
respondSuccess: respondSuccessMock,
|
||||
relayGet: async ({ res, errorResponse }) =>
|
||||
respondErrorMock(res, errorResponse),
|
||||
getToken: async () => ({ access_token: "token" }),
|
||||
hashAPIPath: () => "&hash=expected",
|
||||
azureHeaders: () => ({}),
|
||||
@@ -3135,6 +3144,7 @@ test("getsipsevents returns CASE_ID_REQUIRED when caseid missing", async () => {
|
||||
const mod = loadModule("pages/api/endpoint/getsipsevents_api.js", {
|
||||
respondError: respondErrorMock,
|
||||
respondSuccess: respondSuccessMock,
|
||||
relayGet: async () => ({}),
|
||||
getToken: async () => ({ access_token: "token" }),
|
||||
hashAPIPath: () => "&hash=expected",
|
||||
azureHeaders: () => ({}),
|
||||
@@ -3154,6 +3164,8 @@ test("getsipsevents catch path returns SIPS_EVENTS_FETCH_FAILED", async () => {
|
||||
const mod = loadModule("pages/api/endpoint/getsipsevents_api.js", {
|
||||
respondError: respondErrorMock,
|
||||
respondSuccess: respondSuccessMock,
|
||||
relayGet: async ({ res, errorResponse }) =>
|
||||
respondErrorMock(res, errorResponse),
|
||||
getToken: async () => ({ access_token: "token" }),
|
||||
hashAPIPath: () => "&hash=expected",
|
||||
azureHeaders: () => ({}),
|
||||
|
||||
Reference in New Issue
Block a user