diff options
Diffstat (limited to 'store/sql_post_store_test.go')
-rw-r--r-- | store/sql_post_store_test.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/store/sql_post_store_test.go b/store/sql_post_store_test.go index 7416e0ab7..626894a2a 100644 --- a/store/sql_post_store_test.go +++ b/store/sql_post_store_test.go @@ -352,6 +352,12 @@ func TestPostStorePermDelete1Level(t *testing.T) { o2.RootId = o1.Id o2 = (<-store.Post().Save(o2)).Data.(*model.Post) + o3 := &model.Post{} + o3.ChannelId = model.NewId() + o3.UserId = model.NewId() + o3.Message = "a" + model.NewId() + "b" + o3 = (<-store.Post().Save(o3)).Data.(*model.Post) + if r2 := <-store.Post().PermanentDeleteByUser(o2.UserId); r2.Err != nil { t.Fatal(r2.Err) } @@ -363,6 +369,14 @@ func TestPostStorePermDelete1Level(t *testing.T) { if r4 := (<-store.Post().Get(o2.Id)); r4.Err == nil { t.Fatal("Deleted id should have failed") } + + if r2 := <-store.Post().PermanentDeleteByChannel(o3.ChannelId); r2.Err != nil { + t.Fatal(r2.Err) + } + + if r3 := (<-store.Post().Get(o3.Id)); r3.Err == nil { + t.Fatal("Deleted id should have failed") + } } func TestPostStorePermDelete1Level2(t *testing.T) { |