Skip to content

Commit dabc791

Browse files
Fix "a student cannot use faculty command" test for test suites that use course instead of model for execute
1 parent 55fd6d3 commit dabc791

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

__tests__/jest/slashCommands/slash_hide_course.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ describe("slash hide command", () => {
7676
test("a student cannot use faculty command", async () => {
7777
const client = defaultStudentInteraction.client;
7878
const response = "You do not have permission to use this command.";
79-
await execute(defaultStudentInteraction, client, models);
79+
await execute(defaultStudentInteraction, client, Course);
8080
expect(sendErrorEphemeral).toHaveBeenCalledTimes(1);
8181
expect(sendErrorEphemeral).toHaveBeenCalledWith(defaultStudentInteraction, response);
8282
});

__tests__/jest/slashCommands/slash_lock_chat.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ describe("slash lock_chat command", () => {
7777
test("a student cannot use faculty command", async () => {
7878
const client = defaultStudentInteraction.client;
7979
const response = "You do not have permission to use this command.";
80-
await execute(defaultStudentInteraction, client, models);
80+
await execute(defaultStudentInteraction, client, Course);
8181
expect(sendErrorEphemeral).toHaveBeenCalledTimes(1);
8282
expect(sendErrorEphemeral).toHaveBeenCalledWith(defaultStudentInteraction, response);
8383
});

__tests__/jest/slashCommands/slash_unhide_course.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ describe("slash unhide command", () => {
7878
test("a student cannot use faculty command", async () => {
7979
const client = defaultStudentInteraction.client;
8080
const response = "You do not have permission to use this command.";
81-
await execute(defaultStudentInteraction, client, models);
81+
await execute(defaultStudentInteraction, client, Course);
8282
expect(sendErrorEphemeral).toHaveBeenCalledTimes(1);
8383
expect(sendErrorEphemeral).toHaveBeenCalledWith(defaultStudentInteraction, response);
8484
});

__tests__/jest/slashCommands/slash_unlock_chat.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ describe("slash unlock_chat command", () => {
7878
test("a student cannot use faculty command", async () => {
7979
const client = defaultStudentInteraction.client;
8080
const response = "You do not have permission to use this command.";
81-
await execute(defaultStudentInteraction, client, models);
81+
await execute(defaultStudentInteraction, client, Course);
8282
expect(sendErrorEphemeral).toHaveBeenCalledTimes(1);
8383
expect(sendErrorEphemeral).toHaveBeenCalledWith(defaultStudentInteraction, response);
8484
});

0 commit comments

Comments
 (0)