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
Remove short form
  • Loading branch information
Shubham Sharma committed Jan 19, 2024
commit 69aae566213731ac6964a2c5208d49119acdb057
4 changes: 2 additions & 2 deletions test/unit/utils/genrateCloudFlareHeaders.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ const { expect } = require("chai");
const { generateCloudFlareHeaders } = require("../../../utils/discord-actions");

describe("generateCloudFlareHeaders", function () {
it("generates headers with prop Content-Type and Authorization", function () {
it("generates headers with property Content-Type and Authorization", function () {
const data = generateCloudFlareHeaders();
expect(data["Content-Type"]).to.be.eq("application/json");
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 () {
it("generates headers with property Content-Type and Authorization and X-Audit-Log-Reason when id and userName is passed", function () {
const data = generateCloudFlareHeaders({ id: "id", username: "userName" });
expect(data["Content-Type"]).to.be.eq("application/json");
expect(data.Authorization).to.include("eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9");
Expand Down
Loading