diff options
author | Joram Wilander <jwawilander@gmail.com> | 2016-10-20 10:27:18 -0400 |
---|---|---|
committer | Harrison Healey <harrisonmhealey@gmail.com> | 2016-10-20 10:27:18 -0400 |
commit | 2e34d8843e14093880f62a8c3e1075cb0f0bfc8e (patch) | |
tree | 0e65c5c7a64de5cbbe93c2c45ce1fde805eab666 /api/command_join_test.go | |
parent | 6517b0f9e1acfb7f4a0dd62b86ce4e8c875deba1 (diff) | |
download | chat-2e34d8843e14093880f62a8c3e1075cb0f0bfc8e.tar.gz chat-2e34d8843e14093880f62a8c3e1075cb0f0bfc8e.tar.bz2 chat-2e34d8843e14093880f62a8c3e1075cb0f0bfc8e.zip |
PLT-4138 Fix /join command for non-admin accounts (#4265)
* Fix /join command for non-admin accounts
* Implement found check in join command unit test properly
Diffstat (limited to 'api/command_join_test.go')
-rw-r--r-- | api/command_join_test.go | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/api/command_join_test.go b/api/command_join_test.go index d586a522a..6cf474c6b 100644 --- a/api/command_join_test.go +++ b/api/command_join_test.go @@ -41,7 +41,14 @@ func TestJoinCommands(t *testing.T) { c1 := Client.Must(Client.GetChannels("")).Data.(*model.ChannelList) - if len(c1.Channels) != 5 { - t.Fatal("didn't join channel") + found := false + for _, c := range c1.Channels { + if c.Id == channel2.Id { + found = true + } + } + + if !found { + t.Fatal("did not join channel") } } |