diff --git a/backend/tests/Feature/SetsEndpointTest.php b/backend/tests/Feature/SetsEndpointTest.php index a53d5da..3cdb2cd 100644 --- a/backend/tests/Feature/SetsEndpointTest.php +++ b/backend/tests/Feature/SetsEndpointTest.php @@ -16,9 +16,13 @@ class SetsEndpointTest extends TestCase $setRepository = app(SetRepository::class); $baderechSet = $setRepository->create(new CreateSetDto( name: 'Baderech HaAvodah', + description: 'Baderech HaAvodah is a way of living', + iconImageUrl: '/assets/baderech-haavodah-icon.svg', )); $dailyLearningSet = $setRepository->create(new CreateSetDto( name: 'Daily Learning', + description: 'Daily learning for steady growth', + iconImageUrl: '/assets/daily-learning-icon.svg', )); $response = $this->getJson('/api/sets'); @@ -29,10 +33,14 @@ class SetsEndpointTest extends TestCase [ 'id' => $baderechSet->getId(), 'name' => $baderechSet->getName(), + 'description' => $baderechSet->getDescription(), + 'iconImageUrl' => $baderechSet->getIconImageUrl(), ], [ 'id' => $dailyLearningSet->getId(), 'name' => $dailyLearningSet->getName(), + 'description' => $dailyLearningSet->getDescription(), + 'iconImageUrl' => $dailyLearningSet->getIconImageUrl(), ], ], ]); diff --git a/backend/tests/Unit/Set/SetTest.php b/backend/tests/Unit/Set/SetTest.php index a98ac5f..b3159c2 100644 --- a/backend/tests/Unit/Set/SetTest.php +++ b/backend/tests/Unit/Set/SetTest.php @@ -9,9 +9,22 @@ class SetTest extends TestCase { public function testCreatesSetWithName(): void { - $set = new DomainSet(1, 'Daily learning'); + $set = new DomainSet( + id: 1, + name: 'Daily learning', + description: 'A structured path for daily growth', + iconImageUrl: '/assets/daily-learning-icon.svg', + ); $this->assertSame(1, $set->getId()); $this->assertSame('Daily learning', $set->getName()); + $this->assertSame( + 'A structured path for daily growth', + $set->getDescription() + ); + $this->assertSame( + '/assets/daily-learning-icon.svg', + $set->getIconImageUrl() + ); } }