update unit tests for default channels

Этот коммит содержится в:
JoramWilander
2015-06-29 11:14:12 -04:00
родитель 72d54e427c
Коммит ba998db099
3 изменённых файлов: 26 добавлений и 3 удалений

Просмотреть файл

@@ -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 {