summaryrefslogtreecommitdiffstats
path: root/api4/command_test.go
diff options
context:
space:
mode:
authoralezakos <electrovesta@gmail.com>2018-09-11 22:58:57 +0300
committerJesse Hallam <jesse.hallam@gmail.com>2018-09-11 15:58:57 -0400
commitd585f9d9a3bd7c272a02e1d3d52990bc6ecb37a3 (patch)
treee707643f0daaffe4009f71e2471381989a3ae352 /api4/command_test.go
parent14928ceb745c1326b281bd7f37fffcbb26cce908 (diff)
downloadchat-d585f9d9a3bd7c272a02e1d3d52990bc6ecb37a3.tar.gz
chat-d585f9d9a3bd7c272a02e1d3d52990bc6ecb37a3.tar.bz2
chat-d585f9d9a3bd7c272a02e1d3d52990bc6ecb37a3.zip
MM-11895: Don't crush user-provided GET parameters on slash command URLs (#9372)
Diffstat (limited to 'api4/command_test.go')
-rw-r--r--api4/command_test.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/api4/command_test.go b/api4/command_test.go
index 96025c063..10ffbc695 100644
--- a/api4/command_test.go
+++ b/api4/command_test.go
@@ -491,6 +491,7 @@ func TestExecuteGetCommand(t *testing.T) {
require.Equal(t, token, values.Get("token"))
require.Equal(t, th.BasicTeam.Name, values.Get("team_domain"))
+ require.Equal(t, "ourCommand", values.Get("cmd"))
w.Header().Set("Content-Type", "application/json")
w.Write([]byte(expectedCommandResponse.ToJson()))
@@ -500,7 +501,7 @@ func TestExecuteGetCommand(t *testing.T) {
getCmd := &model.Command{
CreatorId: th.BasicUser.Id,
TeamId: th.BasicTeam.Id,
- URL: ts.URL,
+ URL: ts.URL + "/?cmd=ourCommand",
Method: model.COMMAND_METHOD_GET,
Trigger: "getcommand",
Token: token,