Skip to content

Commit

Permalink
Test lowercase command handling
Browse files Browse the repository at this point in the history
  • Loading branch information
tadzik committed Nov 28, 2024
1 parent 6aaa8f0 commit 1846095
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions spec/integ/admin-rooms.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -873,7 +873,7 @@ describe("Admin rooms", function() {
const newChannel = "#coffee";

// Expect the following commands to be sent in order
const recvCommands = ["JOIN", "TOPIC", "PART", "STUPID"];
const recvCommands = ["JOIN", "TOPIC", "PART", "STUPID", "lowercase"];

let cmdIx = 0;
env.ircMock._whenClient(roomMapping.server, userIdNick, "send",
Expand All @@ -885,15 +885,15 @@ describe("Admin rooms", function() {
cmdIx++;
});

// 4 commands should be executed
const commands = [
`!cmd ${roomMapping.server} JOIN ${newChannel}`,
`!cmd ${roomMapping.server} TOPIC ${newChannel} :some new fancy topic`,
`!cmd ${roomMapping.server} PART ${newChannel}`,
`!cmd ${roomMapping.server} STUPID COMMANDS`];
`!cmd ${roomMapping.server} STUPID COMMANDS`,
`!cmd ${roomMapping.server} lowercase command`,
];

for (let i = 0; i < commands.length; i++) {
// send commands
await env.mockAppService._trigger("type:m.room.message", {
content: {
body: commands[i],
Expand Down

0 comments on commit 1846095

Please sign in to comment.