generated from spatie/package-skeleton-laravel
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make all arguments nullable for modifyOrganization method in Organiza…
…tions resource (#34) - The endpoint allows any value to be null - The changes better reflect the endpoint's functionality - Modified the test case to cover all or no arguments
- Loading branch information
Showing
2 changed files
with
26 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -86,7 +86,7 @@ | |
expect($result)->toBeInstanceOf(Organization::class); | ||
}); | ||
|
||
it('modifies the organization', function () { | ||
it('modifies the organization', function (array $arguments) { | ||
$request = Http::fake([ | ||
'organizations' => Http::response(mockJsonEndpoint('organizations-modify-organization')), | ||
])->asJson(); | ||
|
@@ -97,14 +97,24 @@ | |
$this->createStub(MemberFactory::class), | ||
); | ||
|
||
$result = $resource->modifyOrganization( | ||
'name', | ||
'[email protected]', | ||
true, | ||
'europe', | ||
100, | ||
100 | ||
); | ||
$result = $resource->modifyOrganization(...$arguments); | ||
|
||
expect($result)->toBeInstanceOf(Organization::class); | ||
}); | ||
})->with([ | ||
[ | ||
[ | ||
'name', | ||
'[email protected]', | ||
true, | ||
'europe', | ||
100, | ||
100, | ||
'Fake str. 123', | ||
'example.com', | ||
'Contact Name', | ||
'+12345567890', | ||
'parent_profile_pk', | ||
], | ||
[], | ||
], | ||
]); |