From 3176e13b1f9b14192bef2337ff3fb9346f26ef66 Mon Sep 17 00:00:00 2001 From: Derrick Anderson Date: Fri, 13 Apr 2018 20:42:27 -0400 Subject: revert changes from MM9720 --- cmd/commands/user_test.go | 28 ---------------------------- 1 file changed, 28 deletions(-) (limited to 'cmd/commands/user_test.go') 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)) - -} -- cgit v1.2.3-1-g7c22