Skip to content

Commit

Permalink
fix: improve test resiliance
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohammad-Alavi committed Apr 8, 2022
1 parent 676bc82 commit f60e8c4
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ class UpdateUserTest extends ApiTestCase

public function testUpdateExistingUser(): void
{
$user = $this->getTestingUser();
$user = $this->getTestingUser([
'name' => 'He who should not be named',
'password' => 'Av@dakedavra!',
'gender' => 'female',
]);
$data = [
'name' => 'Updated Name',
'password' => 'updated#Password',
Expand All @@ -42,6 +46,7 @@ public function testUpdateExistingUser(): void
->where('data.name', $data['name'])
->where('data.gender', $data['gender'])
->where('data.birth', Carbon::parse($data['birth'])->toISOString())
->missing('data.password')
->etc()
);
}
Expand Down

0 comments on commit f60e8c4

Please sign in to comment.