summaryrefslogtreecommitdiffstats
path: root/store/storetest/channel_store.go
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2018-03-09 08:06:31 -0500
committerGitHub <noreply@github.com>2018-03-09 08:06:31 -0500
commit8ad99b4b1fbc901a69886d9a12ac016d8396b32f (patch)
tree949411d7b557f8479aec69ba46fa5879b8d258e8 /store/storetest/channel_store.go
parent302dae5bb982aad14324a4df61a018557f3dd24e (diff)
downloadchat-8ad99b4b1fbc901a69886d9a12ac016d8396b32f.tar.gz
chat-8ad99b4b1fbc901a69886d9a12ac016d8396b32f.tar.bz2
chat-8ad99b4b1fbc901a69886d9a12ac016d8396b32f.zip
Remove query to update channel extra_update_at field on user activation/deactivation (#8415)
Diffstat (limited to 'store/storetest/channel_store.go')
-rw-r--r--store/storetest/channel_store.go49
1 files changed, 0 insertions, 49 deletions
diff --git a/store/storetest/channel_store.go b/store/storetest/channel_store.go
index 121b40a01..d3b69edea 100644
--- a/store/storetest/channel_store.go
+++ b/store/storetest/channel_store.go
@@ -43,7 +43,6 @@ func TestChannelStore(t *testing.T, ss store.Store) {
t.Run("GetMember", func(t *testing.T) { testGetMember(t, ss) })
t.Run("GetMemberForPost", func(t *testing.T) { testChannelStoreGetMemberForPost(t, ss) })
t.Run("GetMemberCount", func(t *testing.T) { testGetMemberCount(t, ss) })
- t.Run("UpdateExtrasByUser", func(t *testing.T) { testUpdateExtrasByUser(t, ss) })
t.Run("SearchMore", func(t *testing.T) { testChannelStoreSearchMore(t, ss) })
t.Run("SearchInTeam", func(t *testing.T) { testChannelStoreSearchInTeam(t, ss) })
t.Run("GetMembersByIds", func(t *testing.T) { testChannelStoreGetMembersByIds(t, ss) })
@@ -1641,54 +1640,6 @@ func testGetMemberCount(t *testing.T, ss store.Store) {
}
}
-func testUpdateExtrasByUser(t *testing.T, ss store.Store) {
- teamId := model.NewId()
-
- c1 := model.Channel{
- TeamId: teamId,
- DisplayName: "Channel1",
- Name: "zz" + model.NewId() + "b",
- Type: model.CHANNEL_OPEN,
- }
- store.Must(ss.Channel().Save(&c1, -1))
-
- c2 := model.Channel{
- TeamId: teamId,
- DisplayName: "Channel2",
- Name: "zz" + model.NewId() + "b",
- Type: model.CHANNEL_OPEN,
- }
- store.Must(ss.Channel().Save(&c2, -1))
-
- u1 := &model.User{
- Email: model.NewId(),
- DeleteAt: 0,
- }
- store.Must(ss.User().Save(u1))
- store.Must(ss.Team().SaveMember(&model.TeamMember{TeamId: teamId, UserId: u1.Id}, -1))
-
- m1 := model.ChannelMember{
- ChannelId: c1.Id,
- UserId: u1.Id,
- NotifyProps: model.GetDefaultChannelNotifyProps(),
- }
- store.Must(ss.Channel().SaveMember(&m1))
-
- u1.DeleteAt = model.GetMillis()
- store.Must(ss.User().Update(u1, true))
-
- if result := <-ss.Channel().ExtraUpdateByUser(u1.Id, u1.DeleteAt); result.Err != nil {
- t.Fatalf("failed to update extras by user: %v", result.Err)
- }
-
- u1.DeleteAt = 0
- store.Must(ss.User().Update(u1, true))
-
- if result := <-ss.Channel().ExtraUpdateByUser(u1.Id, u1.DeleteAt); result.Err != nil {
- t.Fatalf("failed to update extras by user: %v", result.Err)
- }
-}
-
func testChannelStoreSearchMore(t *testing.T, ss store.Store) {
o1 := model.Channel{}
o1.TeamId = model.NewId()