From 2d6b6533acc86747425facc9e96303bcccc6daae Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Wed, 29 Jul 2015 18:45:26 -0400 Subject: Add new api procedures: getDefaultTaskColor(), getDefaultTaskColors() and getColorList() --- tests/functionals/UserApiTest.php | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'tests/functionals/UserApiTest.php') 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']); } /** -- cgit v1.2.3