summaryrefslogtreecommitdiff
path: root/tests/units/Model/UserNotificationTest.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-10-17 22:19:49 -0400
committerFrederic Guillot <fred@kanboard.net>2015-10-17 22:19:49 -0400
commit09da289c2fb18475f372bee24e885617da484e0b (patch)
tree95d1869ba3236ccdd9234d7909fc16c495c84d44 /tests/units/Model/UserNotificationTest.php
parent9283fb88d80cb355ff98364a9a57b657fc511d98 (diff)
Move slack, hipchat and jabber integrations to plugins
Diffstat (limited to 'tests/units/Model/UserNotificationTest.php')
-rw-r--r--tests/units/Model/UserNotificationTest.php23
1 files changed, 22 insertions, 1 deletions
diff --git a/tests/units/Model/UserNotificationTest.php b/tests/units/Model/UserNotificationTest.php
index 8d7dec60..729667de 100644
--- a/tests/units/Model/UserNotificationTest.php
+++ b/tests/units/Model/UserNotificationTest.php
@@ -50,6 +50,22 @@ class UserNotificationTest extends Base
'notification_projects' => array(),
));
+ $this->container['userNotificationType']
+ ->expects($this->at(0))
+ ->method('getSelectedTypes')
+ ->will($this->returnValue(array('email')));
+
+ $this->container['userNotificationType']
+ ->expects($this->at(1))
+ ->method('getSelectedTypes')
+ ->will($this->returnValue(array('email')));
+
+ $this->container['userNotificationType']
+ ->expects($this->at(2))
+ ->method('getSelectedTypes')
+ ->with($this->equalTo(1))
+ ->will($this->returnValue(array('email', 'web')));
+
$settings = $n->readSettings(1);
$this->assertNotEmpty($settings);
$this->assertEquals(1, $settings['notifications_enabled']);
@@ -183,12 +199,17 @@ class UserNotificationTest extends Base
$this->container['userNotificationType']
->expects($this->at(0))
+ ->method('getSelectedTypes')
+ ->will($this->returnValue(array('email', 'web')));
+
+ $this->container['userNotificationType']
+ ->expects($this->at(1))
->method('getType')
->with($this->equalTo('email'))
->will($this->returnValue($notifier));
$this->container['userNotificationType']
- ->expects($this->at(1))
+ ->expects($this->at(2))
->method('getType')
->with($this->equalTo('web'))
->will($this->returnValue($notifier));