Skip to content

Commit

Permalink
fix: unit test logic
Browse files Browse the repository at this point in the history
  • Loading branch information
glaubersilva committed Dec 12, 2024
1 parent d507602 commit a794469
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function testExistingPeerToPeerCampaignFormsAreNotMigrated()
*
* @throws Exception
*/
public function testUpgradedFormsAreMigrated()
public function testUpgradedFormsAreNotMigrated()
{
$upgradedForm = DonationForm::factory()->create([
'status' => DonationFormStatus::UPGRADED(),
Expand All @@ -79,9 +79,12 @@ public function testUpgradedFormsAreMigrated()
$migration->run();

$relationship = DB::table('give_campaign_forms')->where('form_id', $upgradedForm->id)->get();
$campaign = Campaign::findByFormId($upgradedForm->id);

$this->assertNotNull($relationship);
$this->assertEquals(2, DB::table('give_campaigns')->count());
$this->assertEquals(0, DB::table('give_campaigns')->where('form_id', $upgradedForm->id)->count());
$this->assertEquals(1, DB::table('give_campaigns')->where('form_id', $newForm->id)->count());
$this->assertEquals(2, DB::table('give_campaign_forms')->where('campaign_id', $campaign->id)->count());
}

/**
Expand Down

0 comments on commit a794469

Please sign in to comment.