diff options
author | i00171 <anton.delitsch@implema.se> | 2016-06-26 18:35:25 +0200 |
---|---|---|
committer | i00171 <anton.delitsch@implema.se> | 2016-06-26 18:35:25 +0200 |
commit | 47039d32c84ba699867920d2c3cb47a34b199b9d (patch) | |
tree | 4fbc2ec34889baeab00085e0509055dca7daee6a /tests/integration/AppProcedureTest.php | |
parent | 911be6ed00c1ece5d9ef2c16e80899bb7bffad67 (diff) | |
parent | c110dffefe259c13e60193fb81ebb9d4b79504de (diff) |
Merge branch 'master' of https://github.com/fguillot/kanboard
Diffstat (limited to 'tests/integration/AppProcedureTest.php')
-rw-r--r-- | tests/integration/AppProcedureTest.php | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/tests/integration/AppProcedureTest.php b/tests/integration/AppProcedureTest.php new file mode 100644 index 00000000..06135dac --- /dev/null +++ b/tests/integration/AppProcedureTest.php @@ -0,0 +1,54 @@ +<?php + +require_once __DIR__.'/BaseProcedureTest.php'; + +class AppProcedureTest extends BaseProcedureTest +{ + 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']); + } + + public function testGetDefaultColor() + { + $this->assertEquals('yellow', $this->user->getDefaultTaskColor()); + } + + public function testGetDefaultColors() + { + $colors = $this->user->getDefaultTaskColors(); + $this->assertNotEmpty($colors); + $this->assertArrayHasKey('red', $colors); + } + + public function testGetColorList() + { + $colors = $this->user->getColorList(); + $this->assertNotEmpty($colors); + $this->assertArrayHasKey('red', $colors); + $this->assertEquals('Red', $colors['red']); + } +} |