Skip to content

Commit

Permalink
tests: add test
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Waldstein committed Feb 18, 2025
1 parent 1ebe791 commit ad35828
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/Unit/Campaigns/Repositories/CampaignRepositoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -430,4 +430,22 @@ public function testMergeCampaignsShouldKeepDefaultFormFromDestinationCampaign()

$this->assertEquals($defaultFormBeforeMerge->id, $destinationCampaign->defaultForm()->id);
}

/**
* @unreleased
* @throws Exception
*/
public function testUpdateCampaignShouldAllowNullableEndDate(): void
{
$repository = new CampaignRepository();
$campaignFactory = Campaign::factory()->create();

$campaignFactory->endDate = null;

$repository->update($campaignFactory);

$campaign = $repository->getById($campaignFactory->id);

$this->assertNull($campaign->endDate);
}
}

0 comments on commit ad35828

Please sign in to comment.