summaryrefslogtreecommitdiff
path: root/tests/units
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-05-18 12:56:32 -0400
committerFrederic Guillot <fred@kanboard.net>2015-05-18 12:56:32 -0400
commit46eafe105fe97b7be8b8a25a72b491bef03fea8c (patch)
treec499a668b23ca6edf4cd158e4f8dc57d6b31edd6 /tests/units
parentac6e7bdfbf3479c655d7b883e50b6b01aa08784d (diff)
Add ical export for users
Diffstat (limited to 'tests/units')
-rw-r--r--tests/units/UserTest.php25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/units/UserTest.php b/tests/units/UserTest.php
index a946621c..a596918e 100644
--- a/tests/units/UserTest.php
+++ b/tests/units/UserTest.php
@@ -167,4 +167,29 @@ class UserTest extends Base
$this->assertEmpty($p->getById(2));
}
+
+ public function testEnableDisablePublicAccess()
+ {
+ $u = new User($this->container);
+ $this->assertNotFalse($u->create(array('username' => 'toto', 'password' => '123456')));
+
+ $user = $u->getById(2);
+ $this->assertNotEmpty($user);
+ $this->assertEquals('toto', $user['username']);
+ $this->assertEmpty($user['token']);
+
+ $this->assertTrue($u->enablePublicAccess(2));
+
+ $user = $u->getById(2);
+ $this->assertNotEmpty($user);
+ $this->assertEquals('toto', $user['username']);
+ $this->assertNotEmpty($user['token']);
+
+ $this->assertTrue($u->disablePublicAccess(2));
+
+ $user = $u->getById(2);
+ $this->assertNotEmpty($user);
+ $this->assertEquals('toto', $user['username']);
+ $this->assertEmpty($user['token']);
+ }
}