Skip to content

Commit

Permalink
Add another payment rail id test case
Browse files Browse the repository at this point in the history
  • Loading branch information
r-kujawa committed May 8, 2024
1 parent 513e468 commit e17ccac
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/Unit/Models/PaymentRailTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,19 @@ public function payment_rail_generates_id_before_committing()
$this->assertEquals("{$parentPaymentType->id}:{$paymentType->id}", $paymentRail->id);
}

#[Test]
public function payment_rail_generates_the_same_id_before_committing_when_parent_type_is_equal_to_type()
{
$paymentType = PaymentType::factory()->create();

$paymentRail = PaymentRail::create([
'parent_type_id' => $paymentType->id,
'type_id' => $paymentType->id,
]);

$this->assertEquals($paymentType->id, $paymentRail->id);
}

#[Test]
public function retrieve_payment_rail_parent_type()
{
Expand Down

0 comments on commit e17ccac

Please sign in to comment.