-
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.
feat: stub out editor & API endpoint and send events for Idox Nexus (#…
- Loading branch information
1 parent
764a9dc
commit fba15e7
Showing
11 changed files
with
571 additions
and
95 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
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import supertest from "supertest"; | ||
import app from "../../../server"; | ||
|
||
describe(`sending an application to Idox Nexus`, () => { | ||
it("fails without authorization header", async () => { | ||
await supertest(app) | ||
.post("/idox/southwark") | ||
.send({ payload: { sessionId: "123" } }) | ||
.expect(401); | ||
}); | ||
|
||
it("errors if the payload body does not include a sessionId", async () => { | ||
await supertest(app) | ||
.post("/idox/southwark") | ||
.set({ Authorization: process.env.HASURA_PLANX_API_KEY! }) | ||
.send({ payload: { somethingElse: "123" } }) | ||
.expect(400) | ||
.then((res) => { | ||
expect(res.body).toEqual({ | ||
error: "Missing application data to send to Idox Nexus", | ||
}); | ||
}); | ||
}); | ||
}); |
Oops, something went wrong.