Skip to content

Commit

Permalink
Updated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ok200paul committed Sep 30, 2024
1 parent 8f170ee commit 1fe5c67
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/Services/VoucherSetService.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public static function validateVoucherSetDenominations(VoucherSet $voucherSet):
$denominationArray = json_decode($voucherSet->denomination_json, true);


if (count($denominationArray) == 0) {
if (is_null($denominationArray) || count($denominationArray) == 0) {
return false;
}

Expand Down
1 change: 1 addition & 0 deletions database/factories/VoucherSetFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public function definition(): array
'num_voucher_redemptions' => $this->faker->numberBetween(1, 10),
'expires_at' => now()->addDays(30),
'voucher_set_type' => fake()->randomElement(VoucherSetType::values()),
'currency_country_id' => 14,
];
}
}

0 comments on commit 1fe5c67

Please sign in to comment.