diff options
author | Jesús Espino <jespinog@gmail.com> | 2018-04-12 17:50:44 +0200 |
---|---|---|
committer | Harrison Healey <harrisonmhealey@gmail.com> | 2018-04-12 11:50:44 -0400 |
commit | 8df6d5cc30d22a608c58635449047e421add82ae (patch) | |
tree | fa1fba7c96cc9f41a35f46b9f092f51b7eff8e1b /cmd/commands/team_test.go | |
parent | 191e1ad5563aada1c282e43eb6fa043e317290c8 (diff) | |
download | chat-8df6d5cc30d22a608c58635449047e421add82ae.tar.gz chat-8df6d5cc30d22a608c58635449047e421add82ae.tar.bz2 chat-8df6d5cc30d22a608c58635449047e421add82ae.zip |
Add list command to teams command in CLI (#8612)
* Add list command to teams command in CLI
* Using App instead of Store to get the teams
Diffstat (limited to 'cmd/commands/team_test.go')
-rw-r--r-- | cmd/commands/team_test.go | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/cmd/commands/team_test.go b/cmd/commands/team_test.go index 1a91df4bc..ac006dbe1 100644 --- a/cmd/commands/team_test.go +++ b/cmd/commands/team_test.go @@ -4,6 +4,7 @@ package commands import ( + "strings" "testing" "github.com/mattermost/mattermost-server/api" @@ -78,3 +79,20 @@ func TestLeaveTeam(t *testing.T) { } } } + +func TestListTeams(t *testing.T) { + th := api.Setup().InitBasic() + defer th.TearDown() + + id := model.NewId() + name := "name" + id + displayName := "Name " + id + + cmd.CheckCommand(t, "team", "create", "--name", name, "--display_name", displayName) + + output := cmd.CheckCommand(t, "team", "list", th.BasicTeam.Name, th.BasicUser.Email) + + if !strings.Contains(string(output), name) { + t.Fatal("should have the created team") + } +} |