Skip to content

Commit

Permalink
Add new GiftcardProgram properties to GiftcardProgramsResourceTest
Browse files Browse the repository at this point in the history
  • Loading branch information
iDiegoNL committed Oct 3, 2024
1 parent a8f8de7 commit 4dde30b
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions tests/OAuth/Giftcards/Program/GiftcardProgramsResourceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,37 @@ public function it_returns_a_list_of_giftcard_programs()
{
$this->addExpectedResponse([
[
'uuid' => '123123',
'name' => 'My Giftcard Program Test',
'active' => true,
'uuid' => '123123',
'max_amount_in_cents' => 10000,
'calculator_flow' => 'default',
'expiration_days' => 365,
],
[
'uuid' => '321321',
'name' => 'My Old Giftcard Program Test',
'active' => false,
'uuid' => '321321',
'max_amount_in_cents' => 5000,
'calculator_flow' => 'overlay',
'expiration_days' => 180,
],
]);

$giftcardPrograms = $this->mockedClient->giftcardProgram->list();

$this->assertEquals('123123', $giftcardPrograms[0]->getUuid());
$this->assertEquals('My Giftcard Program Test', $giftcardPrograms[0]->getName());
$this->assertEquals(true, $giftcardPrograms[0]->isActive());
$this->assertEquals('123123', $giftcardPrograms[0]->getUuid());
$this->assertEquals(10000, $giftcardPrograms[0]->getMaxAmountInCents());
$this->assertEquals('default', $giftcardPrograms[0]->getCalculatorFlow());
$this->assertEquals(365, $giftcardPrograms[0]->getExpirationDays());

$this->assertEquals('321321', $giftcardPrograms[1]->getUuid());
$this->assertEquals('My Old Giftcard Program Test', $giftcardPrograms[1]->getName());
$this->assertEquals(false, $giftcardPrograms[1]->isActive());
$this->assertEquals('321321', $giftcardPrograms[1]->getUuid());
$this->assertEquals(5000, $giftcardPrograms[1]->getMaxAmountInCents());
$this->assertEquals('overlay', $giftcardPrograms[1]->getCalculatorFlow());
$this->assertEquals(180, $giftcardPrograms[1]->getExpirationDays());
}
}

0 comments on commit 4dde30b

Please sign in to comment.