diff options
Diffstat (limited to 'api4/post_test.go')
-rw-r--r-- | api4/post_test.go | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/api4/post_test.go b/api4/post_test.go index 8ccd88a42..3c9875975 100644 --- a/api4/post_test.go +++ b/api4/post_test.go @@ -587,6 +587,12 @@ func TestUpdatePost(t *testing.T) { Client.Logout() + th.LoginTeamAdmin() + _, resp = Client.UpdatePost(rpost.Id, rpost) + CheckForbiddenStatus(t, resp) + + Client.Logout() + _, resp = th.SystemAdminClient.UpdatePost(rpost.Id, rpost) CheckNoError(t, resp) } @@ -673,7 +679,7 @@ func TestPatchPost(t *testing.T) { th.LoginTeamAdmin() _, resp = Client.PatchPost(post.Id, patch) - CheckNoError(t, resp) + CheckForbiddenStatus(t, resp) _, resp = th.SystemAdminClient.PatchPost(post.Id, patch) CheckNoError(t, resp) @@ -1599,7 +1605,7 @@ func TestSearchPostsWithDateFlags(t *testing.T) { posts, _ = Client.SearchPosts(th.BasicTeam.Id, "before:2018-08-03 after:2018-08-01", false) if len(posts.Order) != 1 { t.Fatalf("wrong number of posts returned %v", len(posts.Order)) - } + } } func TestGetFileInfosForPost(t *testing.T) { |