diff options
author | Derrick Anderson <derrick@andersonwebstudio.com> | 2018-04-17 09:21:33 -0400 |
---|---|---|
committer | Derrick Anderson <derrick@andersonwebstudio.com> | 2018-04-17 09:21:33 -0400 |
commit | 885b8e51f3c0b0a4d98814b43917670c2193b3a4 (patch) | |
tree | e68563c27267d1d493e016f6846531bc033f698e /cmd/commands/user_test.go | |
parent | 997df03ac1455785b7a39e40edcd67b3b3e86f9e (diff) | |
parent | 3176e13b1f9b14192bef2337ff3fb9346f26ef66 (diff) | |
download | chat-885b8e51f3c0b0a4d98814b43917670c2193b3a4.tar.gz chat-885b8e51f3c0b0a4d98814b43917670c2193b3a4.tar.bz2 chat-885b8e51f3c0b0a4d98814b43917670c2193b3a4.zip |
Merge remote-tracking branch 'origin/release-4.9' into merge49final
Diffstat (limited to 'cmd/commands/user_test.go')
-rw-r--r-- | cmd/commands/user_test.go | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/cmd/commands/user_test.go b/cmd/commands/user_test.go index a1081c5d3..960ac3878 100644 --- a/cmd/commands/user_test.go +++ b/cmd/commands/user_test.go @@ -9,7 +9,6 @@ import ( "github.com/mattermost/mattermost-server/api" "github.com/mattermost/mattermost-server/cmd" "github.com/mattermost/mattermost-server/model" - "github.com/stretchr/testify/require" ) func TestCreateUserWithTeam(t *testing.T) { @@ -81,30 +80,3 @@ func TestMakeUserActiveAndInactive(t *testing.T) { // activate the inactive user cmd.CheckCommand(t, "user", "activate", th.BasicUser.Email) } - -func TestChangeUserEmail(t *testing.T) { - th := api.Setup().InitBasic() - defer th.TearDown() - - newEmail := model.NewId() + "@mattermost-test.com" - - cmd.CheckCommand(t, "user", "email", th.BasicUser.Username, newEmail) - if result := <-th.App.Srv.Store.User().GetByEmail(th.BasicUser.Email); result.Err == nil { - t.Fatal("should've updated to the new email") - } - if result := <-th.App.Srv.Store.User().GetByEmail(newEmail); result.Err != nil { - t.Fatal() - } else { - user := result.Data.(*model.User) - if user.Email != newEmail { - t.Fatal("should've updated to the new email") - } - } - - // should fail because using an invalid email - require.Error(t, cmd.RunCommand(t, "user", "email", th.BasicUser.Username, "wrong$email.com")) - - // should fail because user not found - require.Error(t, cmd.RunCommand(t, "user", "email", "invalidUser", newEmail)) - -} |