Skip to content

Commit

Permalink
Minor fix
Browse files Browse the repository at this point in the history
Signed-off-by: Sam Poyigi <[email protected]>
  • Loading branch information
sampoyigi committed Dec 30, 2024
1 parent fbabb20 commit f17815d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion tests/Http/Controllers/LocationsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
'X-IGNITER-REQUEST-HANDLER' => 'onSetDefault',
]);

Location::$defaultModels = [];
Location::clearDefaultModel();
expect(Location::getDefaultKey())->toBe($location->getKey());
});

Expand Down
2 changes: 1 addition & 1 deletion tests/Models/LocationAreaTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@
'boundaries' => [
'components' => [
['type' => 'locality', 'value' => 'White City'],
['type' => 'postal_code', 'value' => 'Country'],
['type' => 'postal_code', 'value' => 'Country'], // Invalid postal code
],
],
]);
Expand Down
6 changes: 3 additions & 3 deletions tests/Models/LocationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
});

it('checks if onboarding is complete with valid default location', function() {
Location::$defaultModels = [];
Location::clearDefaultModel();
$location = Location::factory()->create([
'location_lat' => '12.345678',
'location_lng' => '98.765432',
Expand All @@ -39,10 +39,10 @@
});

it('checks if onboarding is incomplete without default location', function() {
Location::$defaultModels = [];
Location::clearDefaultModel();
$default = Location::getDefault();
$default->delete();
Location::$defaultModels = [];
Location::clearDefaultModel();

$result = Location::onboardingIsComplete();

Expand Down

0 comments on commit f17815d

Please sign in to comment.