diff options
author | Derrick Anderson <derrick@andersonwebstudio.com> | 2018-04-13 20:42:27 -0400 |
---|---|---|
committer | Derrick Anderson <derrick@andersonwebstudio.com> | 2018-04-13 20:42:27 -0400 |
commit | 3176e13b1f9b14192bef2337ff3fb9346f26ef66 (patch) | |
tree | f5ecf2deaba116d4fad62703b8d8cc5343fd6be9 /cmd/commands/user_test.go | |
parent | 8056dc33e31d87ff81d286b9991883f953705f15 (diff) | |
download | chat-3176e13b1f9b14192bef2337ff3fb9346f26ef66.tar.gz chat-3176e13b1f9b14192bef2337ff3fb9346f26ef66.tar.bz2 chat-3176e13b1f9b14192bef2337ff3fb9346f26ef66.zip |
revert changes from MM9720
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)) - -} |