diff options
author | Frédéric Guillot <fred@kanboard.net> | 2014-09-12 15:14:59 +0200 |
---|---|---|
committer | Frédéric Guillot <fred@kanboard.net> | 2014-09-12 15:14:59 +0200 |
commit | 15e1ed6148632b7008875207f26345f472a909d1 (patch) | |
tree | e79e82a64ffb154baa470ea1b76cce38d3750d23 /tests | |
parent | dd64bacbb13b6d07c8df01fb88ae417ac57b4239 (diff) |
Improve API calls for subtasks
Diffstat (limited to 'tests')
-rw-r--r-- | tests/functionals/ApiTest.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/functionals/ApiTest.php b/tests/functionals/ApiTest.php index 1f71020a..9a03c891 100644 --- a/tests/functionals/ApiTest.php +++ b/tests/functionals/ApiTest.php @@ -345,7 +345,7 @@ class Api extends PHPUnit_Framework_TestCase 'title' => 'subtask #1', ); - $this->assertTrue($this->client->createSubtask($subtask)); + $this->assertTrue($this->client->execute('createSubtask', $subtask)); } public function testGetSubtask() @@ -360,10 +360,12 @@ class Api extends PHPUnit_Framework_TestCase public function testUpdateSubtask() { - $subtask = $this->client->getSubtask(1); + $subtask = array(); + $subtask['id'] = 1; + $subtask['task_id'] = 1; $subtask['title'] = 'test'; - $this->assertTrue($this->client->updateSubtask($subtask)); + $this->assertTrue($this->client->execute('updateSubtask', $subtask)); $subtask = $this->client->getSubtask(1); $this->assertEquals('test', $subtask['title']); @@ -377,7 +379,7 @@ class Api extends PHPUnit_Framework_TestCase 'title' => 'Subtask #2', ); - $this->assertTrue($this->client->createSubtask($subtask)); + $this->assertTrue($this->client->execute('createSubtask', $subtask)); $subtasks = $this->client->getAllSubtasks(1); $this->assertNotFalse($subtasks); |