diff options
author | Nicolas Clerc <kernicPanel@nclerc.fr> | 2016-02-15 10:24:58 +0100 |
---|---|---|
committer | Nicolas Clerc <kernicPanel@nclerc.fr> | 2016-03-17 01:45:37 +0100 |
commit | 7cb817d5a777965c922fdad49d2024b5f0f86c40 (patch) | |
tree | 4ad2f65b1f4e15d5db849b3a6a554e1048db9492 /api/command_test.go | |
parent | 49eda73749d0920e985fc0f92df34a575088012c (diff) | |
download | chat-7cb817d5a777965c922fdad49d2024b5f0f86c40.tar.gz chat-7cb817d5a777965c922fdad49d2024b5f0f86c40.tar.bz2 chat-7cb817d5a777965c922fdad49d2024b5f0f86c40.zip |
fix TestListCommands
Diffstat (limited to 'api/command_test.go')
-rw-r--r-- | api/command_test.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/api/command_test.go b/api/command_test.go index 22e2bd666..8ca8b65b1 100644 --- a/api/command_test.go +++ b/api/command_test.go @@ -24,7 +24,10 @@ func TestListCommands(t *testing.T) { Client.LoginByEmail(team.Name, user1.Email, "pwd") - if results, err := Client.ListCommands(); err != nil { + channel1 := &model.Channel{DisplayName: "AA", Name: "aa" + model.NewId() + "a", Type: model.CHANNEL_OPEN, TeamId: team.Id} + channel1 = Client.Must(Client.CreateChannel(channel1)).Data.(*model.Channel) + + if results, err := Client.ListCommands(channel1.Id, "/test"); err != nil { t.Fatal(err) } else { commands := results.Data.([]*model.Command) |