Skip to content

Commit 26ac5ce

Browse files
brandonferensm1guelpf
authored andcommitted
Added test for assignee_id parameter option
1 parent 0cd0fb8 commit 26ac5ce

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

test/Gitlab/Tests/Api/IssuesTest.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,26 @@ public function shouldGetIssueClosedByMergeRequests()
434434
$this->assertEquals($expectedArray, $api->closedByMergeRequests(1, 2));
435435
}
436436

437+
/**
438+
* @test
439+
*/
440+
public function shouldGetProjectIssuesByAssignee()
441+
{
442+
$expectedArray = array(
443+
array('id' => 1, 'title' => 'An issue'),
444+
array('id' => 2, 'title' => 'Another issue'),
445+
);
446+
447+
$api = $this->getApiMock();
448+
$api->expects($this->once())
449+
->method('get')
450+
->with('projects/1/issues', array('assignee_id' => 1))
451+
->will($this->returnValue($expectedArray))
452+
;
453+
454+
$this->assertEquals($expectedArray, $api->all(1, array('assignee_id' => 1)));
455+
}
456+
437457
protected function getApiClass()
438458
{
439459
return 'Gitlab\Api\Issues';

0 commit comments

Comments
 (0)