summaryrefslogtreecommitdiffstats
path: root/app/email_batching_test.go
diff options
context:
space:
mode:
authorChris <ccbrown112@gmail.com>2017-09-27 11:52:34 -0500
committerSaturnino Abril <saturnino.abril@gmail.com>2017-09-28 00:52:34 +0800
commit8c80cdde38cceb3424b2b1f43eadf7a1aab0c6df (patch)
treeb3563dfe35ad78991774c9d1842dc439376e1db1 /app/email_batching_test.go
parent1bd66589a2adc67df5df9c108a2f2ecc77dfdf44 (diff)
downloadchat-8c80cdde38cceb3424b2b1f43eadf7a1aab0c6df.tar.gz
chat-8c80cdde38cceb3424b2b1f43eadf7a1aab0c6df.tar.bz2
chat-8c80cdde38cceb3424b2b1f43eadf7a1aab0c6df.zip
remove remaining Global() calls (outside of tests) (#7521)
Diffstat (limited to 'app/email_batching_test.go')
-rw-r--r--app/email_batching_test.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/app/email_batching_test.go b/app/email_batching_test.go
index 2c58d43f8..b69eeec2d 100644
--- a/app/email_batching_test.go
+++ b/app/email_batching_test.go
@@ -13,14 +13,14 @@ import (
)
func TestHandleNewNotifications(t *testing.T) {
- Setup()
+ th := Setup()
id1 := model.NewId()
id2 := model.NewId()
id3 := model.NewId()
// test queueing of received posts by user
- job := MakeEmailBatchingJob(128)
+ job := NewEmailBatchingJob(th.App, 128)
job.handleNewNotifications()
@@ -74,7 +74,7 @@ func TestHandleNewNotifications(t *testing.T) {
}
// test ordering of received posts
- job = MakeEmailBatchingJob(128)
+ job = NewEmailBatchingJob(th.App, 128)
job.Add(&model.User{Id: id1}, &model.Post{UserId: id1, Message: "test1"}, &model.Team{Name: "team"})
job.Add(&model.User{Id: id1}, &model.Post{UserId: id1, Message: "test2"}, &model.Team{Name: "team"})
@@ -95,7 +95,7 @@ func TestHandleNewNotifications(t *testing.T) {
func TestCheckPendingNotifications(t *testing.T) {
th := Setup().InitBasic()
- job := MakeEmailBatchingJob(128)
+ job := NewEmailBatchingJob(th.App, 128)
job.pendingNotifications[th.BasicUser.Id] = []*batchedNotification{
{
post: &model.Post{
@@ -201,7 +201,7 @@ func TestCheckPendingNotifications(t *testing.T) {
*/
func TestCheckPendingNotificationsDefaultInterval(t *testing.T) {
th := Setup().InitBasic()
- job := MakeEmailBatchingJob(128)
+ job := NewEmailBatchingJob(th.App, 128)
// bypasses recent user activity check
channelMember := store.Must(th.App.Srv.Store.Channel().GetMember(th.BasicChannel.Id, th.BasicUser.Id)).(*model.ChannelMember)
@@ -237,7 +237,7 @@ func TestCheckPendingNotificationsDefaultInterval(t *testing.T) {
*/
func TestCheckPendingNotificationsCantParseInterval(t *testing.T) {
th := Setup().InitBasic()
- job := MakeEmailBatchingJob(128)
+ job := NewEmailBatchingJob(th.App, 128)
// bypasses recent user activity check
channelMember := store.Must(th.App.Srv.Store.Channel().GetMember(th.BasicChannel.Id, th.BasicUser.Id)).(*model.ChannelMember)