Merge pull request #6138 from xyjonas/programmatic-archive-unarchive-card
Feat(REST API): add url to (un)archive cards
This commit is contained in:
@@ -120,6 +120,32 @@ class CardApiControllerTest extends \Test\TestCase {
|
||||
$this->assertEquals($expected, $actual);
|
||||
}
|
||||
|
||||
public function testArchive() {
|
||||
$card = new Card();
|
||||
$card->setId($this->cardExample['id']);
|
||||
|
||||
$this->cardService->expects($this->once())
|
||||
->method('archive')
|
||||
->willReturn($card);
|
||||
|
||||
$expected = new DataResponse($card, HTTP::STATUS_OK);
|
||||
$actual = $this->controller->archive($this->cardExample['id']);
|
||||
$this->assertEquals($expected, $actual);
|
||||
}
|
||||
|
||||
public function testUnArchive() {
|
||||
$card = new Card();
|
||||
$card->setId($this->cardExample['id']);
|
||||
|
||||
$this->cardService->expects($this->once())
|
||||
->method('unarchive')
|
||||
->willReturn($card);
|
||||
|
||||
$expected = new DataResponse($card, HTTP::STATUS_OK);
|
||||
$actual = $this->controller->unarchive($this->cardExample['id']);
|
||||
$this->assertEquals($expected, $actual);
|
||||
}
|
||||
|
||||
public function testDelete() {
|
||||
$card = new Card();
|
||||
$card->setId($this->cardExample['id']);
|
||||
|
||||
Reference in New Issue
Block a user