Skip to content

Commit

Permalink
Fix statsEndpoint property in OrganizationFactory.php. It can be empty
Browse files Browse the repository at this point in the history
  • Loading branch information
rapkis committed Oct 6, 2023
1 parent 3de16ff commit 5410ddf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Factories/OrganizationFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function make(array $data): Organization
contactPhone: $data['contact_phone'] ?? '',
website: $data['website'] ?? '',
address: $data['address'] ?? '',
statsEndpoint: $data['stats_endpoint'],
statsEndpoint: $data['stats_endpoint'] ?? '',
twoFactorAuthenticationRequired: (bool) ($data['twofa_req'] ?? null),
date: CarbonImmutable::make($data['date']),
priceUsers: (float) ($data['price_users'] ?? null),
Expand Down
5 changes: 2 additions & 3 deletions tests/Factories/OrganizationFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
'address' => '123 Totally Real St, Toronto',
'max_profiles' => 100,
'status' => 1,
'stats_endpoint' => 'jfk-org01',
'max_users' => 400,
'max_legacy_resolvers' => 10,
'name' => 'Main Inc',
Expand Down Expand Up @@ -60,7 +59,7 @@
contactPhone: '',
website: 'example.com',
address: '123 Totally Real St, Toronto',
statsEndpoint: 'jfk-org01',
statsEndpoint: '',
twoFactorAuthenticationRequired: false,
date: CarbonImmutable::make('2000-01-01'),
priceUsers: 2.00,
Expand Down Expand Up @@ -100,7 +99,6 @@
[
'max_profiles' => 100,
'status' => 1,
'stats_endpoint' => 'jfk-org01',
'max_users' => 400,
'max_legacy_resolvers' => 10,
'name' => 'Main Inc',
Expand Down Expand Up @@ -129,6 +127,7 @@
'max' => 0,
],
// new
'stats_endpoint' => 'jfk-org01',
'parent_profile' => [
'PK' => 'profile_pk',
'updated' => 111111111,
Expand Down

0 comments on commit 5410ddf

Please sign in to comment.