summaryrefslogtreecommitdiffstats
path: root/store/storetest/post_store.go
diff options
context:
space:
mode:
authorChris <ccbrown112@gmail.com>2017-10-20 17:33:20 -0700
committerJoram Wilander <jwawilander@gmail.com>2017-10-20 20:33:20 -0400
commitd39a722a819b154d260b90905065a000749778b6 (patch)
tree94d9a1de7bea296e135624c60bdd2147be344aab /store/storetest/post_store.go
parent812f5664016deb596281d8119321833beafd4599 (diff)
downloadchat-d39a722a819b154d260b90905065a000749778b6.tar.gz
chat-d39a722a819b154d260b90905065a000749778b6.tar.bz2
chat-d39a722a819b154d260b90905065a000749778b6.zip
refactor max channels per team enforcement (#7690)
Diffstat (limited to 'store/storetest/post_store.go')
-rw-r--r--store/storetest/post_store.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/store/storetest/post_store.go b/store/storetest/post_store.go
index f721bed64..3460c4d05 100644
--- a/store/storetest/post_store.go
+++ b/store/storetest/post_store.go
@@ -794,7 +794,7 @@ func testPostStoreSearch(t *testing.T, ss store.Store) {
c1.DisplayName = "Channel1"
c1.Name = "zz" + model.NewId() + "b"
c1.Type = model.CHANNEL_OPEN
- c1 = (<-ss.Channel().Save(c1)).Data.(*model.Channel)
+ c1 = (<-ss.Channel().Save(c1, -1)).Data.(*model.Channel)
m1 := model.ChannelMember{}
m1.ChannelId = c1.Id
@@ -807,7 +807,7 @@ func testPostStoreSearch(t *testing.T, ss store.Store) {
c2.DisplayName = "Channel1"
c2.Name = "zz" + model.NewId() + "b"
c2.Type = model.CHANNEL_OPEN
- c2 = (<-ss.Channel().Save(c2)).Data.(*model.Channel)
+ c2 = (<-ss.Channel().Save(c2, -1)).Data.(*model.Channel)
o1 := &model.Post{}
o1.ChannelId = c1.Id
@@ -926,7 +926,7 @@ func testUserCountsWithPostsByDay(t *testing.T, ss store.Store) {
c1.DisplayName = "Channel2"
c1.Name = "zz" + model.NewId() + "b"
c1.Type = model.CHANNEL_OPEN
- c1 = store.Must(ss.Channel().Save(c1)).(*model.Channel)
+ c1 = store.Must(ss.Channel().Save(c1, -1)).(*model.Channel)
o1 := &model.Post{}
o1.ChannelId = c1.Id
@@ -984,7 +984,7 @@ func testPostCountsByDay(t *testing.T, ss store.Store) {
c1.DisplayName = "Channel2"
c1.Name = "zz" + model.NewId() + "b"
c1.Type = model.CHANNEL_OPEN
- c1 = store.Must(ss.Channel().Save(c1)).(*model.Channel)
+ c1 = store.Must(ss.Channel().Save(c1, -1)).(*model.Channel)
o1 := &model.Post{}
o1.ChannelId = c1.Id
@@ -1045,7 +1045,7 @@ func testPostStoreGetFlaggedPostsForTeam(t *testing.T, ss store.Store) {
c1.DisplayName = "Channel1"
c1.Name = "zz" + model.NewId() + "b"
c1.Type = model.CHANNEL_OPEN
- c1 = store.Must(ss.Channel().Save(c1)).(*model.Channel)
+ c1 = store.Must(ss.Channel().Save(c1, -1)).(*model.Channel)
o1 := &model.Post{}
o1.ChannelId = c1.Id
@@ -1585,14 +1585,14 @@ func testPostStoreGetPostsBatchForIndexing(t *testing.T, ss store.Store) {
c1.DisplayName = "Channel1"
c1.Name = "zz" + model.NewId() + "b"
c1.Type = model.CHANNEL_OPEN
- c1 = (<-ss.Channel().Save(c1)).Data.(*model.Channel)
+ c1 = (<-ss.Channel().Save(c1, -1)).Data.(*model.Channel)
c2 := &model.Channel{}
c2.TeamId = model.NewId()
c2.DisplayName = "Channel2"
c2.Name = "zz" + model.NewId() + "b"
c2.Type = model.CHANNEL_OPEN
- c2 = (<-ss.Channel().Save(c2)).Data.(*model.Channel)
+ c2 = (<-ss.Channel().Save(c2, -1)).Data.(*model.Channel)
o1 := &model.Post{}
o1.ChannelId = c1.Id