fix: Centralize usage of CardDetails

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2023-02-27 23:45:33 +01:00
parent c1a16c9e85
commit 0b2ea0f839
5 changed files with 20 additions and 14 deletions

View File

@@ -34,6 +34,7 @@ use OCA\Deck\Db\Stack;
use OCA\Deck\Db\StackMapper;
use OCA\Deck\Db\BoardMapper;
use OCA\Deck\Db\LabelMapper;
use OCA\Deck\Model\CardDetails;
use OCA\Deck\Notification\NotificationHelper;
use OCA\Deck\StatusException;
use OCA\Deck\Validators\CardServiceValidator;
@@ -188,7 +189,10 @@ class CardServiceTest extends TestCase {
$cardExpected->setRelatedBoard($boardMock);
$cardExpected->setRelatedStack($stackMock);
$cardExpected->setLabels([]);
$this->assertEquals($cardExpected, $this->cardService->find(123));
$expected = new CardDetails($cardExpected);
$actual = $this->cardService->find(123);
$this->assertEquals($expected->jsonSerialize(), $actual->jsonSerialize());
}
public function testCreate() {