diff options
author | Corey Hulen <corey@hulen.com> | 2016-01-20 13:36:27 -0600 |
---|---|---|
committer | Corey Hulen <corey@hulen.com> | 2016-01-20 13:36:27 -0600 |
commit | d703d09063538fb91baa5a21b1001216c43d848a (patch) | |
tree | d87809ff2a306e5428b0ab6973d05509baa21abd /api/post_test.go | |
parent | 0b1aff3b24b4ac2df8e963c83d6e52b127c603f9 (diff) | |
parent | aefbb541d0d5bdd9919fef44fbf1a1fbfeaeb58b (diff) | |
download | chat-d703d09063538fb91baa5a21b1001216c43d848a.tar.gz chat-d703d09063538fb91baa5a21b1001216c43d848a.tar.bz2 chat-d703d09063538fb91baa5a21b1001216c43d848a.zip |
Merge pull request #1932 from mattermost/revert-1930-PLT-7-server-db
Revert " PLT-7 adding loc for db calls"
Diffstat (limited to 'api/post_test.go')
-rw-r--r-- | api/post_test.go | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/api/post_test.go b/api/post_test.go index d2061b187..a0b8cc9bd 100644 --- a/api/post_test.go +++ b/api/post_test.go @@ -23,11 +23,11 @@ func TestCreatePost(t *testing.T) { user1 := &model.User{TeamId: team.Id, Email: model.NewId() + "corey+test@test.com", Nickname: "Corey Hulen", Password: "pwd"} user1 = Client.Must(Client.CreateUser(user1, "")).Data.(*model.User) - store.Must(Srv.Store.User().VerifyEmail(utils.T, user1.Id)) + store.Must(Srv.Store.User().VerifyEmail(user1.Id)) user2 := &model.User{TeamId: team.Id, Email: model.NewId() + "corey+test@test.com", Nickname: "Corey Hulen", Password: "pwd"} user2 = Client.Must(Client.CreateUser(user2, "")).Data.(*model.User) - store.Must(Srv.Store.User().VerifyEmail(utils.T, user2.Id)) + store.Must(Srv.Store.User().VerifyEmail(user2.Id)) Client.LoginByEmail(team.Name, user1.Email, "pwd") @@ -105,7 +105,7 @@ func TestCreatePost(t *testing.T) { user3 := &model.User{TeamId: team2.Id, Email: model.NewId() + "corey+test@test.com", Nickname: "Corey Hulen", Password: "pwd"} user3 = Client.Must(Client.CreateUser(user3, "")).Data.(*model.User) - store.Must(Srv.Store.User().VerifyEmail(utils.T, user3.Id)) + store.Must(Srv.Store.User().VerifyEmail(user3.Id)) Client.LoginByEmail(team2.Name, user3.Email, "pwd") @@ -134,11 +134,11 @@ func TestUpdatePost(t *testing.T) { user1 := &model.User{TeamId: team.Id, Email: model.NewId() + "corey+test@test.com", Nickname: "Corey Hulen", Password: "pwd"} user1 = Client.Must(Client.CreateUser(user1, "")).Data.(*model.User) - store.Must(Srv.Store.User().VerifyEmail(utils.T, user1.Id)) + store.Must(Srv.Store.User().VerifyEmail(user1.Id)) user2 := &model.User{TeamId: team.Id, Email: model.NewId() + "corey+test@test.com", Nickname: "Corey Hulen", Password: "pwd"} user2 = Client.Must(Client.CreateUser(user2, "")).Data.(*model.User) - store.Must(Srv.Store.User().VerifyEmail(utils.T, user2.Id)) + store.Must(Srv.Store.User().VerifyEmail(user2.Id)) Client.LoginByEmail(team.Name, user1.Email, "pwd") @@ -202,7 +202,7 @@ func TestGetPosts(t *testing.T) { user1 := &model.User{TeamId: team.Id, Email: model.NewId() + "corey+test@test.com", Nickname: "Corey Hulen", Password: "pwd"} user1 = Client.Must(Client.CreateUser(user1, "")).Data.(*model.User) - store.Must(Srv.Store.User().VerifyEmail(utils.T, user1.Id)) + store.Must(Srv.Store.User().VerifyEmail(user1.Id)) Client.LoginByEmail(team.Name, user1.Email, "pwd") @@ -267,7 +267,7 @@ func TestGetPostsSince(t *testing.T) { user1 := &model.User{TeamId: team.Id, Email: model.NewId() + "corey+test@test.com", Nickname: "Corey Hulen", Password: "pwd"} user1 = Client.Must(Client.CreateUser(user1, "")).Data.(*model.User) - store.Must(Srv.Store.User().VerifyEmail(utils.T, user1.Id)) + store.Must(Srv.Store.User().VerifyEmail(user1.Id)) Client.LoginByEmail(team.Name, user1.Email, "pwd") @@ -337,7 +337,7 @@ func TestGetPostsBeforeAfter(t *testing.T) { user1 := &model.User{TeamId: team.Id, Email: model.NewId() + "corey+test@test.com", Nickname: "Corey Hulen", Password: "pwd"} user1 = Client.Must(Client.CreateUser(user1, "")).Data.(*model.User) - store.Must(Srv.Store.User().VerifyEmail(utils.T, user1.Id)) + store.Must(Srv.Store.User().VerifyEmail(user1.Id)) Client.LoginByEmail(team.Name, user1.Email, "pwd") @@ -414,7 +414,7 @@ func TestSearchPosts(t *testing.T) { user1 := &model.User{TeamId: team.Id, Email: model.NewId() + "corey+test@test.com", Nickname: "Corey Hulen", Password: "pwd"} user1 = Client.Must(Client.CreateUser(user1, "")).Data.(*model.User) - store.Must(Srv.Store.User().VerifyEmail(utils.T, user1.Id)) + store.Must(Srv.Store.User().VerifyEmail(user1.Id)) Client.LoginByEmail(team.Name, user1.Email, "pwd") @@ -464,7 +464,7 @@ func TestSearchHashtagPosts(t *testing.T) { user1 := &model.User{TeamId: team.Id, Email: model.NewId() + "corey+test@test.com", Nickname: "Corey Hulen", Password: "pwd"} user1 = Client.Must(Client.CreateUser(user1, "")).Data.(*model.User) - store.Must(Srv.Store.User().VerifyEmail(utils.T, user1.Id)) + store.Must(Srv.Store.User().VerifyEmail(user1.Id)) Client.LoginByEmail(team.Name, user1.Email, "pwd") @@ -495,7 +495,7 @@ func TestSearchPostsInChannel(t *testing.T) { user1 := &model.User{TeamId: team.Id, Email: model.NewId() + "corey+test@test.com", Nickname: "Corey Hulen", Password: "pwd"} user1 = Client.Must(Client.CreateUser(user1, "")).Data.(*model.User) - store.Must(Srv.Store.User().VerifyEmail(utils.T, user1.Id)) + store.Must(Srv.Store.User().VerifyEmail(user1.Id)) Client.LoginByEmail(team.Name, user1.Email, "pwd") @@ -577,7 +577,7 @@ func TestSearchPostsFromUser(t *testing.T) { user1 := &model.User{TeamId: team.Id, Email: model.NewId() + "corey+test@test.com", Nickname: "Corey Hulen", Password: "pwd"} user1 = Client.Must(Client.CreateUser(user1, "")).Data.(*model.User) - store.Must(Srv.Store.User().VerifyEmail(utils.T, user1.Id)) + store.Must(Srv.Store.User().VerifyEmail(user1.Id)) Client.LoginByEmail(team.Name, user1.Email, "pwd") @@ -592,7 +592,7 @@ func TestSearchPostsFromUser(t *testing.T) { user2 := &model.User{TeamId: team.Id, Email: model.NewId() + "corey+test@test.com", Nickname: "Corey Hulen", Password: "pwd"} user2 = Client.Must(Client.CreateUser(user2, "")).Data.(*model.User) - store.Must(Srv.Store.User().VerifyEmail(utils.T, user2.Id)) + store.Must(Srv.Store.User().VerifyEmail(user2.Id)) Client.LoginByEmail(team.Name, user2.Email, "pwd") Client.Must(Client.JoinChannel(channel1.Id)) @@ -621,7 +621,7 @@ func TestSearchPostsFromUser(t *testing.T) { user3 := &model.User{TeamId: team.Id, Email: model.NewId() + "corey+test@test.com", Nickname: "Corey Hulen", Password: "pwd"} user3 = Client.Must(Client.CreateUser(user3, "")).Data.(*model.User) - store.Must(Srv.Store.User().VerifyEmail(utils.T, user3.Id)) + store.Must(Srv.Store.User().VerifyEmail(user3.Id)) Client.LoginByEmail(team.Name, user3.Email, "pwd") Client.Must(Client.JoinChannel(channel1.Id)) @@ -655,7 +655,7 @@ func TestGetPostsCache(t *testing.T) { user1 := &model.User{TeamId: team.Id, Email: model.NewId() + "corey+test@test.com", Nickname: "Corey Hulen", Password: "pwd"} user1 = Client.Must(Client.CreateUser(user1, "")).Data.(*model.User) - store.Must(Srv.Store.User().VerifyEmail(utils.T, user1.Id)) + store.Must(Srv.Store.User().VerifyEmail(user1.Id)) Client.LoginByEmail(team.Name, user1.Email, "pwd") @@ -704,11 +704,11 @@ func TestDeletePosts(t *testing.T) { userAdmin := &model.User{TeamId: team.Id, Email: team.Email, Nickname: "Corey Hulen", Password: "pwd"} userAdmin = Client.Must(Client.CreateUser(userAdmin, "")).Data.(*model.User) - store.Must(Srv.Store.User().VerifyEmail(utils.T, userAdmin.Id)) + store.Must(Srv.Store.User().VerifyEmail(userAdmin.Id)) user1 := &model.User{TeamId: team.Id, Email: model.NewId() + "corey+test@test.com", Nickname: "Corey Hulen", Password: "pwd"} user1 = Client.Must(Client.CreateUser(user1, "")).Data.(*model.User) - store.Must(Srv.Store.User().VerifyEmail(utils.T, user1.Id)) + store.Must(Srv.Store.User().VerifyEmail(user1.Id)) Client.LoginByEmail(team.Name, user1.Email, "pwd") @@ -765,7 +765,7 @@ func TestEmailMention(t *testing.T) { user1 := &model.User{TeamId: team.Id, Email: "corey+test@test.com", Nickname: "Bob Bobby", Password: "pwd"} user1 = Client.Must(Client.CreateUser(user1, "")).Data.(*model.User) - store.Must(Srv.Store.User().VerifyEmail(utils.T, user1.Id)) + store.Must(Srv.Store.User().VerifyEmail(user1.Id)) Client.LoginByEmail(team.Name, user1.Email, "pwd") @@ -787,7 +787,7 @@ func TestFuzzyPosts(t *testing.T) { user := &model.User{TeamId: team.Id, Email: model.NewId() + "corey+test@test.com", Nickname: "Corey Hulen", Password: "pwd"} user = Client.Must(Client.CreateUser(user, "")).Data.(*model.User) - store.Must(Srv.Store.User().VerifyEmail(utils.T, user.Id)) + store.Must(Srv.Store.User().VerifyEmail(user.Id)) Client.LoginByEmail(team.Name, user.Email, "pwd") @@ -814,11 +814,11 @@ func TestMakeDirectChannelVisible(t *testing.T) { user1 := &model.User{TeamId: team.Id, Email: model.NewId() + "corey+test@test.com", Nickname: "Corey Hulen", Password: "pwd"} user1 = Client.Must(Client.CreateUser(user1, "")).Data.(*model.User) - store.Must(Srv.Store.User().VerifyEmail(utils.T, user1.Id)) + store.Must(Srv.Store.User().VerifyEmail(user1.Id)) user2 := &model.User{TeamId: team.Id, Email: model.NewId() + "corey+test@test.com", Nickname: "Corey Hulen", Password: "pwd"} user2 = Client.Must(Client.CreateUser(user2, "")).Data.(*model.User) - store.Must(Srv.Store.User().VerifyEmail(utils.T, user2.Id)) + store.Must(Srv.Store.User().VerifyEmail(user2.Id)) // user2 will be created with prefs created to show user1 in the sidebar so set that to false to get rid of it Client.LoginByEmail(team.Name, user2.Email, "pwd") @@ -837,7 +837,7 @@ func TestMakeDirectChannelVisible(t *testing.T) { channel := Client.Must(Client.CreateDirectChannel(map[string]string{"user_id": user2.Id})).Data.(*model.Channel) - makeDirectChannelVisible(utils.T, team.Id, channel.Id) + makeDirectChannelVisible(team.Id, channel.Id) if result, err := Client.GetPreference(model.PREFERENCE_CATEGORY_DIRECT_CHANNEL_SHOW, user2.Id); err != nil { t.Fatal("Errored trying to set direct channel to be visible for user1") |