diff options
author | Martin Kraft <martinkraft@gmail.com> | 2018-05-17 07:53:16 -0400 |
---|---|---|
committer | Martin Kraft <martinkraft@gmail.com> | 2018-05-17 07:53:16 -0400 |
commit | 6f31d90e2f31ae597b83b2f845d5db938af8e38c (patch) | |
tree | 81c59b83ffb033df92ff7fba5ffaf3ba5fe7a3cf /cmd/commands/channel_test.go | |
parent | 319d61123a0418ea9caa9510b8ad1e9a302c7b93 (diff) | |
parent | 1f6c271b3bedd6656ae7155714423b1b39a669c1 (diff) | |
download | chat-6f31d90e2f31ae597b83b2f845d5db938af8e38c.tar.gz chat-6f31d90e2f31ae597b83b2f845d5db938af8e38c.tar.bz2 chat-6f31d90e2f31ae597b83b2f845d5db938af8e38c.zip |
Merge remote-tracking branch 'origin/master' into advanced-permissions-phase-2
Diffstat (limited to 'cmd/commands/channel_test.go')
-rw-r--r-- | cmd/commands/channel_test.go | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/cmd/commands/channel_test.go b/cmd/commands/channel_test.go index bd19b020a..09747b10b 100644 --- a/cmd/commands/channel_test.go +++ b/cmd/commands/channel_test.go @@ -7,17 +7,17 @@ import ( "strings" "testing" - "github.com/mattermost/mattermost-server/api" + "github.com/mattermost/mattermost-server/api4" "github.com/mattermost/mattermost-server/cmd" "github.com/mattermost/mattermost-server/model" "github.com/stretchr/testify/require" ) func TestJoinChannel(t *testing.T) { - th := api.Setup().InitBasic() + th := api4.Setup().InitBasic() defer th.TearDown() - channel := th.CreateChannel(th.BasicClient, th.BasicTeam) + channel := th.CreatePublicChannel() cmd.CheckCommand(t, "channel", "add", th.BasicTeam.Name+":"+channel.Name, th.BasicUser2.Email) @@ -29,10 +29,10 @@ func TestJoinChannel(t *testing.T) { } func TestRemoveChannel(t *testing.T) { - th := api.Setup().InitBasic() + th := api4.Setup().InitBasic() defer th.TearDown() - channel := th.CreateChannel(th.BasicClient, th.BasicTeam) + channel := th.CreatePublicChannel() cmd.CheckCommand(t, "channel", "add", th.BasicTeam.Name+":"+channel.Name, th.BasicUser2.Email) @@ -46,12 +46,11 @@ func TestRemoveChannel(t *testing.T) { } func TestMoveChannel(t *testing.T) { - th := api.Setup().InitBasic() + th := api4.Setup().InitBasic() defer th.TearDown() - client := th.BasicClient team1 := th.BasicTeam - team2 := th.CreateTeam(client) + team2 := th.CreateTeam() user1 := th.BasicUser th.LinkUserToTeam(user1, team2) channel := th.BasicChannel @@ -73,11 +72,11 @@ func TestMoveChannel(t *testing.T) { } func TestListChannels(t *testing.T) { - th := api.Setup().InitBasic() + th := api4.Setup().InitBasic() defer th.TearDown() - channel := th.CreateChannel(th.BasicClient, th.BasicTeam) - th.BasicClient.Must(th.BasicClient.DeleteChannel(channel.Id)) + channel := th.CreatePublicChannel() + th.Client.Must(th.Client.DeleteChannel(channel.Id)) output := cmd.CheckCommand(t, "channel", "list", th.BasicTeam.Name) @@ -91,11 +90,11 @@ func TestListChannels(t *testing.T) { } func TestRestoreChannel(t *testing.T) { - th := api.Setup().InitBasic() + th := api4.Setup().InitBasic() defer th.TearDown() - channel := th.CreateChannel(th.BasicClient, th.BasicTeam) - th.BasicClient.Must(th.BasicClient.DeleteChannel(channel.Id)) + channel := th.CreatePublicChannel() + th.Client.Must(th.Client.DeleteChannel(channel.Id)) cmd.CheckCommand(t, "channel", "restore", th.BasicTeam.Name+":"+channel.Name) @@ -104,7 +103,7 @@ func TestRestoreChannel(t *testing.T) { } func TestCreateChannel(t *testing.T) { - th := api.Setup().InitBasic() + th := api4.Setup().InitBasic() defer th.TearDown() id := model.NewId() |