summaryrefslogtreecommitdiffstats
path: root/model/post_test.go
diff options
context:
space:
mode:
authorSaturnino Abril <saturnino.abril@gmail.com>2017-08-01 20:16:45 +0800
committerJoram Wilander <jwawilander@gmail.com>2017-08-01 08:16:45 -0400
commit88f398ffddbcbb58265d085c09cb72008be3f3d5 (patch)
tree6db22e220a781a144808e113505ce040c7e2eac7 /model/post_test.go
parentb023b891550cd8fb2f874e822f05921d13f51fb2 (diff)
downloadchat-88f398ffddbcbb58265d085c09cb72008be3f3d5.tar.gz
chat-88f398ffddbcbb58265d085c09cb72008be3f3d5.tar.bz2
chat-88f398ffddbcbb58265d085c09cb72008be3f3d5.zip
Revert " #4755 Combining consecutive user join/leave system messages to single message and few other changes." (#7072)
* Revert "PLT-6603: Don't return all posts on invalid query. (#7061)" This reverts commit 25a2013890c7e07b4621fa9b18342e7f35363049. * Revert " #4755 Combining consecutive user join/leave system messages to single message and few other changes. (#5945)" This reverts commit 8a91235fb3cdc8d094dbc2eaa0d7baa447132b3c.
Diffstat (limited to 'model/post_test.go')
-rw-r--r--model/post_test.go45
1 files changed, 0 insertions, 45 deletions
diff --git a/model/post_test.go b/model/post_test.go
index 64c8a2f3d..1096ccbd8 100644
--- a/model/post_test.go
+++ b/model/post_test.go
@@ -113,48 +113,3 @@ func TestPostIsSystemMessage(t *testing.T) {
t.Fatalf("TestPostIsSystemMessage failed, expected post2.IsSystemMessage() to be true")
}
}
-
-func TestPostIsUserActivitySystemMessage(t *testing.T) {
- post1 := Post{Message: "test_1"}
- post1.PreSave()
-
- if post1.IsUserActivitySystemMessage() {
- t.Fatalf("TestPostIsUserActivitySystemMessage failed, expected post1.IsSystemMessage() to be false")
- }
-
- post2 := Post{Message: "test_2", Type: POST_JOIN_LEAVE}
- post2.PreSave()
- if !post2.IsUserActivitySystemMessage() {
- t.Fatalf("TestPostIsUserActivitySystemMessage failed, expected post2.IsSystemMessage() to be true")
- }
-
- post3 := Post{Message: "test_3", Type: POST_JOIN_CHANNEL}
- post3.PreSave()
- if !post3.IsUserActivitySystemMessage() {
- t.Fatalf("TestPostIsUserActivitySystemMessage failed, expected post3.IsSystemMessage() to be true")
- }
-
- post4 := Post{Message: "test_4", Type: POST_LEAVE_CHANNEL}
- post4.PreSave()
- if !post4.IsUserActivitySystemMessage() {
- t.Fatalf("TestPostIsUserActivitySystemMessage failed, expected post4.IsSystemMessage() to be true")
- }
-
- post5 := Post{Message: "test_5", Type: POST_ADD_REMOVE}
- post5.PreSave()
- if !post5.IsUserActivitySystemMessage() {
- t.Fatalf("TestPostIsUserActivitySystemMessage failed, expected post5.IsSystemMessage() to be true")
- }
-
- post6 := Post{Message: "test_6", Type: POST_ADD_TO_CHANNEL}
- post6.PreSave()
- if !post6.IsUserActivitySystemMessage() {
- t.Fatalf("TestPostIsUserActivitySystemMessage failed, expected post6.IsSystemMessage() to be true")
- }
-
- post7 := Post{Message: "test_7", Type: POST_REMOVE_FROM_CHANNEL}
- post7.PreSave()
- if !post7.IsUserActivitySystemMessage() {
- t.Fatalf("TestPostIsUserActivitySystemMessage failed, expected post7.IsSystemMessage() to be true")
- }
-}