Skip to content

Commit 26da5cb

Browse files
committed
fix: failing tests
1 parent c77e3df commit 26da5cb

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

tests/fixtures/fixture.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ export const messageRequestMemberMockNonSuperUser = {
308308
export const messageRequestMemberMockSuperUser = {
309309
member: {
310310
user: {
311-
id: Number(SUPER_USER_ONE),
311+
id: 154585730465660929n,
312312
username: "ankush",
313313
avatar: "https://cdn.discordapp.com/avatars/1/userAvatarHash.jpg",
314314
discriminator: "discriminator",

tests/unit/handlers/kickEachUser.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
} from "../../fixtures/fixture";
77

88
describe("kickEachUser", () => {
9-
it("should run when found no users with Matched Role", async () => {
9+
it("should fail when a non super_user runs ", async () => {
1010
const env = {
1111
BOT_PUBLIC_KEY: "xyz",
1212
DISCORD_GUILD_ID: "123",
@@ -29,11 +29,11 @@ describe("kickEachUser", () => {
2929
(res) => res.json()
3030
);
3131
expect(textMessage.data.content).toBe(
32-
`We couldn't find any user(s) assigned to <@&${roleID}> role.`
32+
`You're not authorized to make this request.`
3333
);
3434
});
3535

36-
it("should fail when a non super_user runs ", async () => {
36+
it("should run when found no users with Matched Role", async () => {
3737
const env = {
3838
BOT_PUBLIC_KEY: "xyz",
3939
DISCORD_GUILD_ID: "123",
@@ -56,7 +56,7 @@ describe("kickEachUser", () => {
5656
(res) => res.json()
5757
);
5858
expect(textMessage.data.content).toBe(
59-
`You're not authorized to make this request.`
59+
`We couldn't find any user(s) assigned to <@&${roleID}> role.`
6060
);
6161
});
6262
});

0 commit comments

Comments
 (0)