summaryrefslogtreecommitdiffstats
path: root/store/storetest/channel_store.go
diff options
context:
space:
mode:
authorJesse Hallam <jesse.hallam@gmail.com>2018-05-14 09:43:06 -0400
committerGitHub <noreply@github.com>2018-05-14 09:43:06 -0400
commit7e7c55198719337e7cb39b07c0d5a48c0a6908de (patch)
tree83ddc7fced3ab2fa4bd54da20155e336db53522e /store/storetest/channel_store.go
parentc9196af23efae32f7d836b20d6e41ec4d09a43ce (diff)
downloadchat-7e7c55198719337e7cb39b07c0d5a48c0a6908de.tar.gz
chat-7e7c55198719337e7cb39b07c0d5a48c0a6908de.tar.bz2
chat-7e7c55198719337e7cb39b07c0d5a48c0a6908de.zip
MM-9739: deprecate the now unused Channels.ExtraUpdateAt (#8762)
Diffstat (limited to 'store/storetest/channel_store.go')
-rw-r--r--store/storetest/channel_store.go33
1 files changed, 0 insertions, 33 deletions
diff --git a/store/storetest/channel_store.go b/store/storetest/channel_store.go
index 481631783..ccb7b87b8 100644
--- a/store/storetest/channel_store.go
+++ b/store/storetest/channel_store.go
@@ -713,9 +713,6 @@ func testChannelMemberStore(t *testing.T, ss store.Store) {
c1.Type = model.CHANNEL_OPEN
c1 = *store.Must(ss.Channel().Save(&c1, -1)).(*model.Channel)
- c1t1 := (<-ss.Channel().Get(c1.Id, false)).Data.(*model.Channel)
- t1 := c1t1.ExtraUpdateAt
-
u1 := model.User{}
u1.Email = model.NewId()
u1.Nickname = model.NewId()
@@ -740,13 +737,6 @@ func testChannelMemberStore(t *testing.T, ss store.Store) {
o2.NotifyProps = model.GetDefaultChannelNotifyProps()
store.Must(ss.Channel().SaveMember(&o2))
- c1t2 := (<-ss.Channel().Get(c1.Id, false)).Data.(*model.Channel)
- t2 := c1t2.ExtraUpdateAt
-
- if t2 <= t1 {
- t.Fatal("Member update time incorrect")
- }
-
count := (<-ss.Channel().GetMemberCount(o1.ChannelId, true)).Data.(int64)
if count != 2 {
t.Fatal("should have saved 2 members")
@@ -777,13 +767,6 @@ func testChannelMemberStore(t *testing.T, ss store.Store) {
t.Fatal("should have removed 1 member")
}
- c1t3 := (<-ss.Channel().Get(c1.Id, false)).Data.(*model.Channel)
- t3 := c1t3.ExtraUpdateAt
-
- if t3 <= t2 || t3 <= t1 {
- t.Fatal("Member update time incorrect on delete")
- }
-
member := (<-ss.Channel().GetMember(o1.ChannelId, o1.UserId)).Data.(*model.ChannelMember)
if member.ChannelId != o1.ChannelId {
t.Fatal("should have go member")
@@ -792,12 +775,6 @@ func testChannelMemberStore(t *testing.T, ss store.Store) {
if err := (<-ss.Channel().SaveMember(&o1)).Err; err == nil {
t.Fatal("Should have been a duplicate")
}
-
- c1t4 := (<-ss.Channel().Get(c1.Id, false)).Data.(*model.Channel)
- t4 := c1t4.ExtraUpdateAt
- if t4 != t3 {
- t.Fatal("Should not update time upon failure")
- }
}
func testChannelDeleteMemberStore(t *testing.T, ss store.Store) {
@@ -808,9 +785,6 @@ func testChannelDeleteMemberStore(t *testing.T, ss store.Store) {
c1.Type = model.CHANNEL_OPEN
c1 = *store.Must(ss.Channel().Save(&c1, -1)).(*model.Channel)
- c1t1 := (<-ss.Channel().Get(c1.Id, false)).Data.(*model.Channel)
- t1 := c1t1.ExtraUpdateAt
-
u1 := model.User{}
u1.Email = model.NewId()
u1.Nickname = model.NewId()
@@ -835,13 +809,6 @@ func testChannelDeleteMemberStore(t *testing.T, ss store.Store) {
o2.NotifyProps = model.GetDefaultChannelNotifyProps()
store.Must(ss.Channel().SaveMember(&o2))
- c1t2 := (<-ss.Channel().Get(c1.Id, false)).Data.(*model.Channel)
- t2 := c1t2.ExtraUpdateAt
-
- if t2 <= t1 {
- t.Fatal("Member update time incorrect")
- }
-
count := (<-ss.Channel().GetMemberCount(o1.ChannelId, false)).Data.(int64)
if count != 2 {
t.Fatal("should have saved 2 members")