Tests: Add integration test for user assignment
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
committed by
Julius Härtl
parent
1f3276acee
commit
a322c7a3b5
@@ -29,7 +29,7 @@ use OCP\IRequest;
|
||||
|
||||
class CardControllerTest extends \PHPUnit_Framework_TestCase {
|
||||
|
||||
/** @var Controller|\PHPUnit_Framework_MockObject_MockObject */
|
||||
/** @var CardController|\PHPUnit_Framework_MockObject_MockObject */
|
||||
private $controller;
|
||||
/** @var IRequest|\PHPUnit_Framework_MockObject_MockObject */
|
||||
private $request;
|
||||
@@ -114,4 +114,14 @@ class CardControllerTest extends \PHPUnit_Framework_TestCase {
|
||||
$this->controller->rename(1, 'test');
|
||||
}
|
||||
|
||||
public function testAssignUser() {
|
||||
$this->cardService->expects($this->once())->method('assignUser');
|
||||
$this->controller->assignUser(1, 'admin');
|
||||
}
|
||||
|
||||
public function testUnssignUser() {
|
||||
$this->cardService->expects($this->once())->method('unassignUser');
|
||||
$this->controller->unassignUser(1, 'admin');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user