From 15e1ed6148632b7008875207f26345f472a909d1 Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Fri, 12 Sep 2014 15:14:59 +0200 Subject: Improve API calls for subtasks --- tests/functionals/ApiTest.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'tests') 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); -- cgit v1.2.3