diff options
author | Justyn Shull <justyns@codero.com> | 2015-09-29 11:48:13 -0500 |
---|---|---|
committer | Justyn Shull <justyns@codero.com> | 2015-09-29 11:48:13 -0500 |
commit | 5064f9cba2a63c166776279b2763151f8aed5310 (patch) | |
tree | 8406c3d662c61912a47e0a1571a14a5528913a1d /api/command_test.go | |
parent | 2c11cbc266b87e7596c628b414e9229a534411a8 (diff) | |
download | chat-5064f9cba2a63c166776279b2763151f8aed5310.tar.gz chat-5064f9cba2a63c166776279b2763151f8aed5310.tar.bz2 chat-5064f9cba2a63c166776279b2763151f8aed5310.zip |
Update the /join command to use the correct redirect URL, and update the test to match
Diffstat (limited to 'api/command_test.go')
-rw-r--r-- | api/command_test.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/api/command_test.go b/api/command_test.go index fe52dd41b..d70729448 100644 --- a/api/command_test.go +++ b/api/command_test.go @@ -4,6 +4,7 @@ package api import ( + "strings" "testing" "github.com/mattermost/platform/model" @@ -126,12 +127,12 @@ func TestJoinCommands(t *testing.T) { } rs5 := Client.Must(Client.Command("", "/join "+channel2.Name, false)).Data.(*model.Command) - if rs5.GotoLocation != "/channels/"+channel2.Name { + if !strings.HasSuffix(rs5.GotoLocation, "/"+team.Name+"/channels/"+channel2.Name) { t.Fatal("failed to join channel") } rs6 := Client.Must(Client.Command("", "/join "+channel3.Name, false)).Data.(*model.Command) - if rs6.GotoLocation == "/channels/"+channel3.Name { + if strings.HasSuffix(rs6.GotoLocation, "/"+team.Name+"/channels/"+channel3.Name) { t.Fatal("should not have joined direct message channel") } |