diff options
author | Corey Hulen <corey@hulen.com> | 2015-06-29 21:16:07 -0800 |
---|---|---|
committer | Corey Hulen <corey@hulen.com> | 2015-06-29 21:16:07 -0800 |
commit | 4d2ca8881bf1aac6bc393988901b4ef523a5ef14 (patch) | |
tree | ba2e8ac114866477d53060d67913e5ca9dfec64d /api/channel_test.go | |
parent | e6b5bdef82b23d61286ff455ee245a26a40d195f (diff) | |
parent | ba998db0998e7782842e4f86a242edd1e52b5e97 (diff) | |
download | chat-4d2ca8881bf1aac6bc393988901b4ef523a5ef14.tar.gz chat-4d2ca8881bf1aac6bc393988901b4ef523a5ef14.tar.bz2 chat-4d2ca8881bf1aac6bc393988901b4ef523a5ef14.zip |
Merge pull request #98 from mattermost/mm-1199
fixes mm-1199 adds off-topic as a default channel
Diffstat (limited to 'api/channel_test.go')
-rw-r--r-- | api/channel_test.go | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/api/channel_test.go b/api/channel_test.go index 2e2e3683a..dfae840dc 100644 --- a/api/channel_test.go +++ b/api/channel_test.go @@ -35,8 +35,15 @@ func TestCreateChannel(t *testing.T) { } rget := Client.Must(Client.GetChannels("")).Data.(*model.ChannelList) - if rget.Channels[0].Name != channel.Name { - t.Fatal("full name didn't match") + nameMatch := false + for _, c := range rget.Channels { + if c.Name == channel.Name { + nameMatch = true + } + } + + if !nameMatch { + t.Fatal("Did not create channel with correct name") } if _, err := Client.CreateChannel(rchannel.Data.(*model.Channel)); err == nil { |