Add ical export for users

This commit is contained in:
Frederic Guillot
2015-05-18 12:56:32 -04:00
parent ac6e7bdfbf
commit 46eafe105f
11 changed files with 231 additions and 11 deletions

View File

@@ -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']);
}
}