summaryrefslogtreecommitdiffstats
path: root/api4/post_test.go
diff options
context:
space:
mode:
authorChris <ccbrown112@gmail.com>2017-10-30 11:57:24 -0500
committerGitHub <noreply@github.com>2017-10-30 11:57:24 -0500
commitc5e8cb25caa39ed018ede5270e1566e8f7448396 (patch)
tree80f9f8957d4ff8458ecf9631135c916df25544bd /api4/post_test.go
parent63df41b91110bac06baffef87fe0c1952b47ac93 (diff)
downloadchat-c5e8cb25caa39ed018ede5270e1566e8f7448396.tar.gz
chat-c5e8cb25caa39ed018ede5270e1566e8f7448396.tar.bz2
chat-c5e8cb25caa39ed018ede5270e1566e8f7448396.zip
simplify things (#7735)
Diffstat (limited to 'api4/post_test.go')
-rw-r--r--api4/post_test.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/api4/post_test.go b/api4/post_test.go
index 054c9fc06..6f195296a 100644
--- a/api4/post_test.go
+++ b/api4/post_test.go
@@ -572,7 +572,7 @@ func TestPatchPost(t *testing.T) {
rpost, resp := Client.PatchPost(post.Id, patch)
CheckNoError(t, resp)
- if rpost.IsPinned != false {
+ if rpost.IsPinned {
t.Fatal("IsPinned did not update properly")
}
if rpost.Message != "#otherhashtag other message" {
@@ -593,7 +593,7 @@ func TestPatchPost(t *testing.T) {
if !reflect.DeepEqual(rpost.FileIds, *patch.FileIds) {
t.Fatal("FileIds did not update properly")
}
- if rpost.HasReactions != false {
+ if rpost.HasReactions {
t.Fatal("HasReactions did not update properly")
}
@@ -642,7 +642,7 @@ func TestPinPost(t *testing.T) {
t.Fatal("should have passed")
}
- if rpost, err := th.App.GetSinglePost(post.Id); err != nil && rpost.IsPinned != true {
+ if rpost, err := th.App.GetSinglePost(post.Id); err != nil && !rpost.IsPinned {
t.Fatal("failed to pin post")
}
@@ -677,7 +677,7 @@ func TestUnpinPost(t *testing.T) {
t.Fatal("should have passed")
}
- if rpost, err := th.App.GetSinglePost(pinnedPost.Id); err != nil && rpost.IsPinned != false {
+ if rpost, err := th.App.GetSinglePost(pinnedPost.Id); err != nil && rpost.IsPinned {
t.Fatal("failed to pin post")
}
@@ -1157,7 +1157,7 @@ func TestDeletePost(t *testing.T) {
CheckUnauthorizedStatus(t, resp)
status, resp := th.SystemAdminClient.DeletePost(post.Id)
- if status == false {
+ if !status {
t.Fatal("post should return status OK")
}
CheckNoError(t, resp)
@@ -1443,7 +1443,7 @@ func TestGetFileInfosForPost(t *testing.T) {
defer th.TearDown()
Client := th.Client
- fileIds := make([]string, 3, 3)
+ fileIds := make([]string, 3)
if data, err := readTestFile("test.png"); err != nil {
t.Fatal(err)
} else {