diff options
author | Frédéric Guillot <fred@kanboard.net> | 2014-11-01 16:38:14 -0400 |
---|---|---|
committer | Frédéric Guillot <fred@kanboard.net> | 2014-11-01 16:38:14 -0400 |
commit | d040a6c5f60749bc03b266f9a343b889faddf1df (patch) | |
tree | 5578750c5ddd0b32d560217f86a4302369267850 /tests | |
parent | d97e1bd4cfd013b54e72f446a0e5934fff559781 (diff) |
Fix issue with notifications and projects that allow everybody
Diffstat (limited to 'tests')
-rw-r--r-- | tests/units/NotificationTest.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/units/NotificationTest.php b/tests/units/NotificationTest.php index de0ea9d9..1c8fb6e5 100644 --- a/tests/units/NotificationTest.php +++ b/tests/units/NotificationTest.php @@ -58,6 +58,7 @@ class NotificationTest extends Base $this->assertEquals(1, $p->create(array('name' => 'UnitTest1'))); $this->assertEquals(2, $p->create(array('name' => 'UnitTest2'))); + $this->assertEquals(3, $p->create(array('name' => 'UnitTest3', 'is_everybody_allowed' => 1))); // Email + Notifications enabled $this->assertTrue($u->create(array('username' => 'user1', 'email' => 'user1@here', 'notifications_enabled' => 1))); @@ -116,5 +117,17 @@ class NotificationTest extends Base $this->assertNotEmpty($users); $this->assertEquals(1, count($users)); $this->assertEquals('user3@here', $users[0]['email']); + + // Project #3 allow everybody + $users = $n->getUsersList(3); + $this->assertNotEmpty($users); + $this->assertEquals(1, count($users)); + $this->assertEquals('user1@here', $users[0]['email']); + + $users = $n->getUsersWithNotification(3); + $this->assertNotEmpty($users); + $this->assertEquals(2, count($users)); + $this->assertEquals('user1@here', $users[0]['email']); + $this->assertEquals('user3@here', $users[1]['email']); } } |