mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Update the /join command to use the correct redirect URL, and update the test to match
This commit is contained in:
@@ -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")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user