summaryrefslogtreecommitdiff
path: root/tests/functionals/UserApiTest.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-07-29 18:45:26 -0400
committerFrederic Guillot <fred@kanboard.net>2015-07-29 18:45:26 -0400
commit2d6b6533acc86747425facc9e96303bcccc6daae (patch)
tree7a17fe198ba916bcaea3fcd73860d2d7610ac1e4 /tests/functionals/UserApiTest.php
parentf595fb2786d884dbaf7ec87d53cee920a0655f0e (diff)
Add new api procedures: getDefaultTaskColor(), getDefaultTaskColors() and getColorList()
Diffstat (limited to 'tests/functionals/UserApiTest.php')
-rw-r--r--tests/functionals/UserApiTest.php25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/functionals/UserApiTest.php b/tests/functionals/UserApiTest.php
index 6fe6dad6..e1ce1878 100644
--- a/tests/functionals/UserApiTest.php
+++ b/tests/functionals/UserApiTest.php
@@ -97,6 +97,26 @@ class UserApi extends PHPUnit_Framework_TestCase
$this->assertEquals('master', $this->user->getVersion());
}
+ 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']);
+ }
+
public function testGetMe()
{
$profile = $this->user->getMe();
@@ -137,6 +157,11 @@ class UserApi extends PHPUnit_Framework_TestCase
$task = $this->user->getTask(1);
$this->assertNotEmpty($task);
$this->assertEquals('my user title', $task['title']);
+ $this->assertEquals('yellow', $task['color_id']);
+ $this->assertArrayHasKey('color', $task);
+ $this->assertArrayHasKey('name', $task['color']);
+ $this->assertArrayHasKey('border', $task['color']);
+ $this->assertArrayHasKey('background', $task['color']);
}
/**