diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-01-22 21:23:12 -0500 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-01-22 21:23:12 -0500 |
commit | ad8fcf035ab92d8cd06179959000b9a1681b1505 (patch) | |
tree | 80f4e35b16c1c1a6d4c473983bc6cb62b9519494 /tests/integration/AppTest.php | |
parent | f27bcec2d92af83ee7205c84954cda9d7b2fc55d (diff) |
Add new API procedures for groups, roles and project permissions
Diffstat (limited to 'tests/integration/AppTest.php')
-rw-r--r-- | tests/integration/AppTest.php | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/tests/integration/AppTest.php b/tests/integration/AppTest.php new file mode 100644 index 00000000..6575fbb8 --- /dev/null +++ b/tests/integration/AppTest.php @@ -0,0 +1,34 @@ +<?php + +require_once __DIR__.'/Base.php'; + +class AppTest extends Base +{ + public function testGetTimezone() + { + $this->assertEquals('UTC', $this->app->getTimezone()); + } + + public function testGetVersion() + { + $this->assertEquals('master', $this->app->getVersion()); + } + + public function testGetApplicationRoles() + { + $roles = $this->app->getApplicationRoles(); + $this->assertCount(3, $roles); + $this->assertEquals('Administrator', $roles['app-admin']); + $this->assertEquals('Manager', $roles['app-manager']); + $this->assertEquals('User', $roles['app-user']); + } + + public function testGetProjectRoles() + { + $roles = $this->app->getProjectRoles(); + $this->assertCount(3, $roles); + $this->assertEquals('Project Manager', $roles['project-manager']); + $this->assertEquals('Project Member', $roles['project-member']); + $this->assertEquals('Project Viewer', $roles['project-viewer']); + } +} |