summaryrefslogtreecommitdiffstats
path: root/store/sql_channel_store_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'store/sql_channel_store_test.go')
-rw-r--r--store/sql_channel_store_test.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/store/sql_channel_store_test.go b/store/sql_channel_store_test.go
index 90a5f4479..51ca11e8e 100644
--- a/store/sql_channel_store_test.go
+++ b/store/sql_channel_store_test.go
@@ -340,6 +340,14 @@ func TestChannelStoreDelete(t *testing.T) {
if len(*list) != 1 {
t.Fatal("invalid number of channels")
}
+
+ <-store.Channel().PermanentDelete(o2.Id)
+
+ cresult = <-store.Channel().GetChannels(o1.TeamId, m1.UserId)
+ t.Log(cresult.Err)
+ if cresult.Err.Id != "store.sql_channel.get_channels.not_found.app_error" {
+ t.Fatal("no channels should be found")
+ }
}
func TestChannelStoreGetByName(t *testing.T) {
@@ -560,6 +568,15 @@ func TestChannelDeleteMemberStore(t *testing.T) {
if count != 1 {
t.Fatal("should have removed 1 member")
}
+
+ if r1 := <-store.Channel().PermanentDeleteMembersByChannel(o1.ChannelId); r1.Err != nil {
+ t.Fatal(r1.Err)
+ }
+
+ count = (<-store.Channel().GetMemberCount(o1.ChannelId, false)).Data.(int64)
+ if count != 0 {
+ t.Fatal("should have removed all members")
+ }
}
func TestChannelStoreGetChannels(t *testing.T) {