summaryrefslogtreecommitdiffstats
path: root/api/post_test.go
diff options
context:
space:
mode:
authorGeorge Goldberg <george@gberg.me>2017-03-23 17:38:24 +0000
committerGeorge Goldberg <george@gberg.me>2017-03-23 17:38:24 +0000
commitc6ded1dbfd69a1da69add8d2b554f4b7dd0341b3 (patch)
treea417d54a58edd244edb03935705618737cf2cf13 /api/post_test.go
parent120f5a6f8a5f4ab05aace89ae710698cf68d0564 (diff)
parent8ec37570742b67fd640bb3434ea226c655dbf408 (diff)
downloadchat-c6ded1dbfd69a1da69add8d2b554f4b7dd0341b3.tar.gz
chat-c6ded1dbfd69a1da69add8d2b554f4b7dd0341b3.tar.bz2
chat-c6ded1dbfd69a1da69add8d2b554f4b7dd0341b3.zip
Merge branch 'release-3.7'
Diffstat (limited to 'api/post_test.go')
-rw-r--r--api/post_test.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/api/post_test.go b/api/post_test.go
index 5546e7165..6558aeb5b 100644
--- a/api/post_test.go
+++ b/api/post_test.go
@@ -993,6 +993,19 @@ func TestDeletePosts(t *testing.T) {
t.Fatal(err)
}
+ // Check that if unlicensed the policy restriction is not enforced.
+ utils.IsLicensed = false
+ utils.License = nil
+ utils.SetDefaultRolesBasedOnConfig()
+
+ time.Sleep(10 * time.Millisecond)
+ post7 := &model.Post{ChannelId: channel1.Id, Message: "a" + model.NewId() + "a"}
+ post7 = Client.Must(Client.CreatePost(post7)).Data.(*model.Post)
+
+ if _, err := Client.DeletePost(channel1.Id, post7.Id); err != nil {
+ t.Fatal(err)
+ }
+
SystemAdminClient.Must(SystemAdminClient.DeletePost(channel1.Id, post6a.Id))
}