summaryrefslogtreecommitdiffstats
path: root/store/storetest/user_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/user_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/user_store.go')
-rw-r--r--store/storetest/user_store.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/store/storetest/user_store.go b/store/storetest/user_store.go
index d00e88f56..3c2297e95 100644
--- a/store/storetest/user_store.go
+++ b/store/storetest/user_store.go
@@ -410,8 +410,8 @@ func testUserStoreGetProfilesInChannel(t *testing.T, ss store.Store) {
c2.Name = "profiles-" + model.NewId()
c2.Type = model.CHANNEL_PRIVATE
- store.Must(ss.Channel().Save(&c1))
- store.Must(ss.Channel().Save(&c2))
+ store.Must(ss.Channel().Save(&c1, -1))
+ store.Must(ss.Channel().Save(&c2, -1))
m1 := model.ChannelMember{}
m1.ChannelId = c1.Id
@@ -527,8 +527,8 @@ func testUserStoreGetAllProfilesInChannel(t *testing.T, ss store.Store) {
c2.Name = "profiles-" + model.NewId()
c2.Type = model.CHANNEL_PRIVATE
- store.Must(ss.Channel().Save(&c1))
- store.Must(ss.Channel().Save(&c2))
+ store.Must(ss.Channel().Save(&c1, -1))
+ store.Must(ss.Channel().Save(&c2, -1))
m1 := model.ChannelMember{}
m1.ChannelId = c1.Id
@@ -615,8 +615,8 @@ func testUserStoreGetProfilesNotInChannel(t *testing.T, ss store.Store) {
c2.Name = "profiles-" + model.NewId()
c2.Type = model.CHANNEL_PRIVATE
- store.Must(ss.Channel().Save(&c1))
- store.Must(ss.Channel().Save(&c2))
+ store.Must(ss.Channel().Save(&c1, -1))
+ store.Must(ss.Channel().Save(&c2, -1))
if r1 := <-ss.User().GetProfilesNotInChannel(teamId, c1.Id, 0, 100); r1.Err != nil {
t.Fatal(r1.Err)
@@ -1164,7 +1164,7 @@ func testUserUnreadCount(t *testing.T, ss store.Store) {
store.Must(ss.User().Save(u2))
store.Must(ss.Team().SaveMember(&model.TeamMember{TeamId: teamId, UserId: u2.Id}))
- if err := (<-ss.Channel().Save(&c1)).Err; err != nil {
+ if err := (<-ss.Channel().Save(&c1, -1)).Err; err != nil {
t.Fatal("couldn't save item", err)
}
@@ -1581,7 +1581,7 @@ func testUserStoreSearch(t *testing.T, ss store.Store) {
c1.DisplayName = "NameName"
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)
if r1 := <-ss.User().SearchNotInChannel(tid, c1.Id, "jimb", searchOptions); r1.Err != nil {
t.Fatal(r1.Err)