diff options
author | hmhealey <harrisonmhealey@gmail.com> | 2015-09-30 11:08:36 -0400 |
---|---|---|
committer | hmhealey <harrisonmhealey@gmail.com> | 2015-10-01 08:31:11 -0400 |
commit | c16b9de8dc4924cf2fb243579284e67f55cf3a47 (patch) | |
tree | d7780fae809cec0b021281638f25ed7920050b0a /store/sql_channel_store_test.go | |
parent | 111fbb2495e88d69bec29971da8ddf086ac3f3b6 (diff) | |
download | chat-c16b9de8dc4924cf2fb243579284e67f55cf3a47.tar.gz chat-c16b9de8dc4924cf2fb243579284e67f55cf3a47.tar.bz2 chat-c16b9de8dc4924cf2fb243579284e67f55cf3a47.zip |
Replaced ChannelMember.MarkUnreadLevel with ChannelMember.NotifyProps
Diffstat (limited to 'store/sql_channel_store_test.go')
-rw-r--r-- | store/sql_channel_store_test.go | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/store/sql_channel_store_test.go b/store/sql_channel_store_test.go index b97440306..45c05645e 100644 --- a/store/sql_channel_store_test.go +++ b/store/sql_channel_store_test.go @@ -136,14 +136,14 @@ func TestChannelStoreDelete(t *testing.T) { m1.ChannelId = o1.Id m1.UserId = model.NewId() m1.NotifyLevel = model.CHANNEL_NOTIFY_ALL - m1.MarkUnreadLevel = model.CHANNEL_MARK_UNREAD_ALL + m1.NotifyProps = model.GetDefaultChannelNotifyProps() Must(store.Channel().SaveMember(&m1)) m2 := model.ChannelMember{} m2.ChannelId = o2.Id m2.UserId = m1.UserId m2.NotifyLevel = model.CHANNEL_NOTIFY_ALL - m2.MarkUnreadLevel = model.CHANNEL_MARK_UNREAD_ALL + m2.NotifyProps = model.GetDefaultChannelNotifyProps() Must(store.Channel().SaveMember(&m2)) if r := <-store.Channel().Delete(o1.Id, model.GetMillis()); r.Err != nil { @@ -225,14 +225,14 @@ func TestChannelMemberStore(t *testing.T) { o1.ChannelId = c1.Id o1.UserId = u1.Id o1.NotifyLevel = model.CHANNEL_NOTIFY_ALL - o1.MarkUnreadLevel = model.CHANNEL_MARK_UNREAD_ALL + o1.NotifyProps = model.GetDefaultChannelNotifyProps() Must(store.Channel().SaveMember(&o1)) o2 := model.ChannelMember{} o2.ChannelId = c1.Id o2.UserId = u2.Id o2.NotifyLevel = model.CHANNEL_NOTIFY_ALL - o2.MarkUnreadLevel = model.CHANNEL_MARK_UNREAD_ALL + o2.NotifyProps = model.GetDefaultChannelNotifyProps() Must(store.Channel().SaveMember(&o2)) c1t2 := (<-store.Channel().Get(c1.Id)).Data.(*model.Channel) @@ -296,7 +296,7 @@ func TestChannelStorePermissionsTo(t *testing.T) { m1.ChannelId = o1.Id m1.UserId = model.NewId() m1.NotifyLevel = model.CHANNEL_NOTIFY_ALL - m1.MarkUnreadLevel = model.CHANNEL_MARK_UNREAD_ALL + m1.NotifyProps = model.GetDefaultChannelNotifyProps() Must(store.Channel().SaveMember(&m1)) count := (<-store.Channel().CheckPermissionsTo(o1.TeamId, o1.Id, m1.UserId)).Data.(int64) @@ -377,21 +377,21 @@ func TestChannelStoreGetChannels(t *testing.T) { m1.ChannelId = o1.Id m1.UserId = model.NewId() m1.NotifyLevel = model.CHANNEL_NOTIFY_ALL - m1.MarkUnreadLevel = model.CHANNEL_MARK_UNREAD_ALL + m1.NotifyProps = model.GetDefaultChannelNotifyProps() Must(store.Channel().SaveMember(&m1)) m2 := model.ChannelMember{} m2.ChannelId = o1.Id m2.UserId = model.NewId() m2.NotifyLevel = model.CHANNEL_NOTIFY_ALL - m2.MarkUnreadLevel = model.CHANNEL_MARK_UNREAD_ALL + m2.NotifyProps = model.GetDefaultChannelNotifyProps() Must(store.Channel().SaveMember(&m2)) m3 := model.ChannelMember{} m3.ChannelId = o2.Id m3.UserId = model.NewId() m3.NotifyLevel = model.CHANNEL_NOTIFY_ALL - m3.MarkUnreadLevel = model.CHANNEL_MARK_UNREAD_ALL + m3.NotifyProps = model.GetDefaultChannelNotifyProps() Must(store.Channel().SaveMember(&m3)) cresult := <-store.Channel().GetChannels(o1.TeamId, m1.UserId) @@ -423,21 +423,21 @@ func TestChannelStoreGetMoreChannels(t *testing.T) { m1.ChannelId = o1.Id m1.UserId = model.NewId() m1.NotifyLevel = model.CHANNEL_NOTIFY_ALL - m1.MarkUnreadLevel = model.CHANNEL_MARK_UNREAD_ALL + m1.NotifyProps = model.GetDefaultChannelNotifyProps() Must(store.Channel().SaveMember(&m1)) m2 := model.ChannelMember{} m2.ChannelId = o1.Id m2.UserId = model.NewId() m2.NotifyLevel = model.CHANNEL_NOTIFY_ALL - m2.MarkUnreadLevel = model.CHANNEL_MARK_UNREAD_ALL + m2.NotifyProps = model.GetDefaultChannelNotifyProps() Must(store.Channel().SaveMember(&m2)) m3 := model.ChannelMember{} m3.ChannelId = o2.Id m3.UserId = model.NewId() m3.NotifyLevel = model.CHANNEL_NOTIFY_ALL - m3.MarkUnreadLevel = model.CHANNEL_MARK_UNREAD_ALL + m3.NotifyProps = model.GetDefaultChannelNotifyProps() Must(store.Channel().SaveMember(&m3)) o3 := model.Channel{} @@ -494,21 +494,21 @@ func TestChannelStoreGetChannelCounts(t *testing.T) { m1.ChannelId = o1.Id m1.UserId = model.NewId() m1.NotifyLevel = model.CHANNEL_NOTIFY_ALL - m1.MarkUnreadLevel = model.CHANNEL_MARK_UNREAD_ALL + m1.NotifyProps = model.GetDefaultChannelNotifyProps() Must(store.Channel().SaveMember(&m1)) m2 := model.ChannelMember{} m2.ChannelId = o1.Id m2.UserId = model.NewId() m2.NotifyLevel = model.CHANNEL_NOTIFY_ALL - m2.MarkUnreadLevel = model.CHANNEL_MARK_UNREAD_ALL + m2.NotifyProps = model.GetDefaultChannelNotifyProps() Must(store.Channel().SaveMember(&m2)) m3 := model.ChannelMember{} m3.ChannelId = o2.Id m3.UserId = model.NewId() m3.NotifyLevel = model.CHANNEL_NOTIFY_ALL - m3.MarkUnreadLevel = model.CHANNEL_MARK_UNREAD_ALL + m3.NotifyProps = model.GetDefaultChannelNotifyProps() Must(store.Channel().SaveMember(&m3)) cresult := <-store.Channel().GetChannelCounts(o1.TeamId, m1.UserId) @@ -538,7 +538,7 @@ func TestChannelStoreUpdateLastViewedAt(t *testing.T) { m1.ChannelId = o1.Id m1.UserId = model.NewId() m1.NotifyLevel = model.CHANNEL_NOTIFY_ALL - m1.MarkUnreadLevel = model.CHANNEL_MARK_UNREAD_ALL + m1.NotifyProps = model.GetDefaultChannelNotifyProps() Must(store.Channel().SaveMember(&m1)) err := (<-store.Channel().UpdateLastViewedAt(m1.ChannelId, m1.UserId)).Err @@ -567,7 +567,7 @@ func TestChannelStoreIncrementMentionCount(t *testing.T) { m1.ChannelId = o1.Id m1.UserId = model.NewId() m1.NotifyLevel = model.CHANNEL_NOTIFY_ALL - m1.MarkUnreadLevel = model.CHANNEL_MARK_UNREAD_ALL + m1.NotifyProps = model.GetDefaultChannelNotifyProps() Must(store.Channel().SaveMember(&m1)) err := (<-store.Channel().IncrementMentionCount(m1.ChannelId, m1.UserId)).Err |