Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added functionality to pass down the header to bot #1848

Merged
merged 14 commits into from
Jan 21, 2024
Prev Previous commit
Next Next commit
Fixed the testcase file name
  • Loading branch information
Shubham Sharma committed Jan 15, 2024
commit 3c22ef29bcf313a64ebf6baebde6725ed8149304
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ describe("genrateCloudFlareHeaders", function () {
it("generates headers with prop Content-Type and Authorization", function () {
skv93-coder marked this conversation as resolved.
Show resolved Hide resolved
const data = genrateCloudFlareHeaders();
expect(data["Content-Type"]).to.be.eq("application/json");
expect(data).to.include("eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9");
expect(data.Authorization).to.include("eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9");
});
it("generates headers with prop Content-Type and Authorization and X-Audit-Log-Reason when id and userName is passed", function () {
const data = genrateCloudFlareHeaders({ id: "is", userName: "userName" });
const data = genrateCloudFlareHeaders({ id: "id", userName: "userName" });
expect(data["Content-Type"]).to.be.eq("application/json");
expect(data.Authorization).to.include("eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9");
expect(data["X-Audit-Log-Reason"]).to.be.eq("Action initiator's username=>userName and id=id");
Expand Down
Loading