summaryrefslogtreecommitdiff
path: root/tests/integration/AppProcedureTest.php
diff options
context:
space:
mode:
authorJLGC @monolinux <monolinux@junglacode.org>2016-08-15 23:13:16 -0500
committerJLGC @monolinux <monolinux@junglacode.org>2016-08-15 23:13:16 -0500
commit683c0464093f6a7976236c68653c2a2cc5dae280 (patch)
treebf176ecd82415cc4952eea071b7d264dd5fd68b4 /tests/integration/AppProcedureTest.php
parentb1e795fc5b45369f7b9b565b1e106d2673361977 (diff)
parent5f82a942c0011bf91947b2c1d627c0907bda0c92 (diff)
Merge https://github.com/kanboard/kanboard
Diffstat (limited to 'tests/integration/AppProcedureTest.php')
-rw-r--r--tests/integration/AppProcedureTest.php54
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']);
+ }
+}