diff options
author | Frédéric Guillot <fred@kanboard.net> | 2014-11-22 18:22:10 -0500 |
---|---|---|
committer | Frédéric Guillot <fred@kanboard.net> | 2014-11-22 18:22:10 -0500 |
commit | 77e10d25829f3523a168bf61424fac99a539f8be (patch) | |
tree | 9b3d274146fa9543c4734a945e61b9d975960ff6 /tests/units/NotificationTest.php | |
parent | 15038cdb10f8c691edc7980fd1aed32dcbed3f9f (diff) |
Improve API to return id instead of a boolean
Diffstat (limited to 'tests/units/NotificationTest.php')
-rw-r--r-- | tests/units/NotificationTest.php | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/units/NotificationTest.php b/tests/units/NotificationTest.php index 770a9829..d8e623e1 100644 --- a/tests/units/NotificationTest.php +++ b/tests/units/NotificationTest.php @@ -19,16 +19,16 @@ class NotificationTest extends Base $this->assertEquals(1, $p->create(array('name' => 'UnitTest1'))); // Email + Notifications enabled - $this->assertTrue($u->create(array('username' => 'user1', 'email' => 'user1@here', 'notifications_enabled' => 1))); + $this->assertNotFalse($u->create(array('username' => 'user1', 'email' => 'user1@here', 'notifications_enabled' => 1))); // No email + Notifications enabled - $this->assertTrue($u->create(array('username' => 'user2', 'email' => '', 'notifications_enabled' => 1))); + $this->assertNotFalse($u->create(array('username' => 'user2', 'email' => '', 'notifications_enabled' => 1))); // Email + Notifications enabled - $this->assertTrue($u->create(array('username' => 'user3', 'email' => 'user3@here', 'notifications_enabled' => 1))); + $this->assertNotFalse($u->create(array('username' => 'user3', 'email' => 'user3@here', 'notifications_enabled' => 1))); // No email + notifications disabled - $this->assertTrue($u->create(array('username' => 'user4'))); + $this->assertNotFalse($u->create(array('username' => 'user4'))); // Nobody is member of any projects $this->assertEmpty($pp->getMembers(1)); @@ -61,16 +61,16 @@ class NotificationTest extends Base $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))); + $this->assertNotFalse($u->create(array('username' => 'user1', 'email' => 'user1@here', 'notifications_enabled' => 1))); // No email + Notifications enabled - $this->assertTrue($u->create(array('username' => 'user2', 'email' => '', 'notifications_enabled' => 1))); + $this->assertNotFalse($u->create(array('username' => 'user2', 'email' => '', 'notifications_enabled' => 1))); // Email + Notifications enabled - $this->assertTrue($u->create(array('username' => 'user3', 'email' => 'user3@here', 'notifications_enabled' => 1))); + $this->assertNotFalse($u->create(array('username' => 'user3', 'email' => 'user3@here', 'notifications_enabled' => 1))); // No email + notifications disabled - $this->assertTrue($u->create(array('username' => 'user4'))); + $this->assertNotFalse($u->create(array('username' => 'user4'))); // We allow all users to be member of our projects $this->assertTrue($pp->allowUser(1, 1)); |