diff options
author | Corey Hulen <corey@hulen.com> | 2017-08-28 07:08:37 -0700 |
---|---|---|
committer | Harrison Healey <harrisonmhealey@gmail.com> | 2017-08-28 10:08:37 -0400 |
commit | 1709b94227ed33e789f1be00d26ebbb972ce86b7 (patch) | |
tree | bfadf6b52b2ce8985b59529aeb1b890fa214190d /app/notification_test.go | |
parent | a12cf549cf0dc394189f7a37f090bd3eebbca8ca (diff) | |
download | chat-1709b94227ed33e789f1be00d26ebbb972ce86b7.tar.gz chat-1709b94227ed33e789f1be00d26ebbb972ce86b7.tar.bz2 chat-1709b94227ed33e789f1be00d26ebbb972ce86b7.zip |
PLT-5745 Cleaning up duplicate calls (#7298)
* PLT-5745 Cleaning up duplicate calls
* Fixing missing calls
* Fixing broken test
Diffstat (limited to 'app/notification_test.go')
-rw-r--r-- | app/notification_test.go | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/app/notification_test.go b/app/notification_test.go index 5f57290e7..ae6d0504a 100644 --- a/app/notification_test.go +++ b/app/notification_test.go @@ -16,17 +16,17 @@ func TestSendNotifications(t *testing.T) { AddUserToChannel(th.BasicUser2, th.BasicChannel) - post1, err := CreatePost(&model.Post{ + post1, err := CreatePostMissingChannel(&model.Post{ UserId: th.BasicUser.Id, ChannelId: th.BasicChannel.Id, Message: "@" + th.BasicUser2.Username, - }, th.BasicTeam.Id, true) + }, true) if err != nil { t.Fatal(err) } - mentions, err := SendNotifications(post1, th.BasicTeam, th.BasicChannel, th.BasicUser) + mentions, err := SendNotifications(post1, th.BasicTeam, th.BasicChannel, th.BasicUser, nil) if err != nil { t.Fatal(err) } else if mentions == nil { @@ -42,17 +42,17 @@ func TestSendNotifications(t *testing.T) { t.Fatal(err) } - post2, err := CreatePost(&model.Post{ + post2, err := CreatePostMissingChannel(&model.Post{ UserId: th.BasicUser.Id, ChannelId: dm.Id, Message: "dm message", - }, th.BasicTeam.Id, true) + }, true) if err != nil { t.Fatal(err) } - _, err = SendNotifications(post2, th.BasicTeam, dm, th.BasicUser) + _, err = SendNotifications(post2, th.BasicTeam, dm, th.BasicUser, nil) if err != nil { t.Fatal(err) } @@ -60,17 +60,17 @@ func TestSendNotifications(t *testing.T) { UpdateActive(th.BasicUser2, false) InvalidateAllCaches() - post3, err := CreatePost(&model.Post{ + post3, err := CreatePostMissingChannel(&model.Post{ UserId: th.BasicUser.Id, ChannelId: dm.Id, Message: "dm message", - }, th.BasicTeam.Id, true) + }, true) if err != nil { t.Fatal(err) } - _, err = SendNotifications(post3, th.BasicTeam, dm, th.BasicUser) + _, err = SendNotifications(post3, th.BasicTeam, dm, th.BasicUser, nil) if err != nil { t.Fatal(err) } |