diff options
author | Chris <ccbrown112@gmail.com> | 2017-10-30 11:57:24 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-30 11:57:24 -0500 |
commit | c5e8cb25caa39ed018ede5270e1566e8f7448396 (patch) | |
tree | 80f9f8957d4ff8458ecf9631135c916df25544bd /api/post_test.go | |
parent | 63df41b91110bac06baffef87fe0c1952b47ac93 (diff) | |
download | chat-c5e8cb25caa39ed018ede5270e1566e8f7448396.tar.gz chat-c5e8cb25caa39ed018ede5270e1566e8f7448396.tar.bz2 chat-c5e8cb25caa39ed018ede5270e1566e8f7448396.zip |
simplify things (#7735)
Diffstat (limited to 'api/post_test.go')
-rw-r--r-- | api/post_test.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/api/post_test.go b/api/post_test.go index 138b3dcb9..cb6b2bfb2 100644 --- a/api/post_test.go +++ b/api/post_test.go @@ -1321,7 +1321,7 @@ func TestGetFileInfosForPost(t *testing.T) { Client := th.BasicClient channel1 := th.BasicChannel - fileIds := make([]string, 3, 3) + fileIds := make([]string, 3) if data, err := readTestFile("test.png"); err != nil { t.Fatal(err) } else { @@ -1531,7 +1531,7 @@ func TestPinPost(t *testing.T) { if rupost1, err := Client.PinPost(post.ChannelId, post.Id); err != nil { t.Fatal(err) } else { - if rupost1.Data.(*model.Post).IsPinned != true { + if !rupost1.Data.(*model.Post).IsPinned { t.Fatal("failed to pin post") } } @@ -1540,7 +1540,7 @@ func TestPinPost(t *testing.T) { if rupost2, err := Client.PinPost(pinnedPost.ChannelId, pinnedPost.Id); err != nil { t.Fatal(err) } else { - if rupost2.Data.(*model.Post).IsPinned != true { + if !rupost2.Data.(*model.Post).IsPinned { t.Fatal("pinning a post should be idempotent") } } @@ -1556,7 +1556,7 @@ func TestUnpinPost(t *testing.T) { if rupost1, err := Client.UnpinPost(pinnedPost.ChannelId, pinnedPost.Id); err != nil { t.Fatal(err) } else { - if rupost1.Data.(*model.Post).IsPinned != false { + if rupost1.Data.(*model.Post).IsPinned { t.Fatal("failed to unpin post") } } @@ -1565,7 +1565,7 @@ func TestUnpinPost(t *testing.T) { if rupost2, err := Client.UnpinPost(post.ChannelId, post.Id); err != nil { t.Fatal(err) } else { - if rupost2.Data.(*model.Post).IsPinned != false { + if rupost2.Data.(*model.Post).IsPinned { t.Fatal("unpinning a post should be idempotent") } } |