Skip to content

Commit

Permalink
test: update tests with the new amount levels schema
Browse files Browse the repository at this point in the history
  • Loading branch information
pauloiankoski committed Apr 30, 2024
1 parent a7c7761 commit 6d97fd8
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 15 deletions.
13 changes: 6 additions & 7 deletions tests/Unit/DataTransferObjects/DonateFormRouteDataTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,14 +140,13 @@ public function testValidatedShouldReturnValidatedDataWithSubscriptionData()
"attributes": {
"label": "Donation Amount",
"levels": [
"10",
"25",
"50",
"100",
"250",
"500"
{"value": "10"},
{"value": "25"},
{"value": "50"},
{"value": "100", "checked": true},
{"value": "250"},
{"value": "500"}
],
"defaultLevel": "100",
"priceOption": "multi",
"setPrice": "100",
"customAmount": "true",
Expand Down
12 changes: 6 additions & 6 deletions tests/Unit/DataTransferObjects/ValidationRouteDataTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,12 @@ public function testValidateShouldReturnTrueWithRecurringOptions()
"attributes": {
"label": "Donation Amount",
"levels": [
"10",
"25",
"50",
"100",
"250",
"500"
{"value": "10"},
{"value": "25"},
{"value": "50"},
{"value": "100"},
{"value": "250"},
{"value": "500"}
],
"priceOption": "multi",
"setPrice": "100",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,14 @@ public function testRecurringMetaIsStoredOnUpdate()
'isValid' => true,
'attributes' => [
'label' => 'Donation Amount',
'levels' => ['10', '25', '50', '100', '250', '500'],
'levels' => [
['value' => '10'],
['value' => '25'],
['value' => '50'],
['value' => '100'],
['value' => '250'],
['value' => '500'],
],
'priceOption' => 'multi',
'setPrice' => '25',
'customAmount' => 'true',
Expand Down Expand Up @@ -131,7 +138,14 @@ public function testRecurringMetaIsStoredOnInsert()
'isValid' => true,
'attributes' => [
'label' => 'Donation Amount',
'levels' => ['10', '25', '50', '100', '250', '500'],
'levels' => [
['value' => '10'],
['value' => '25'],
['value' => '50'],
['value' => '100'],
['value' => '250'],
['value' => '500'],
],
'priceOption' => 'multi',
'setPrice' => '25',
'customAmount' => 'true',
Expand Down

0 comments on commit 6d97fd8

Please sign in to comment.