From f60e8c47d2013984848ff33cbc3112cd516750d0 Mon Sep 17 00:00:00 2001 From: Mohammad Alavi Date: Fri, 8 Apr 2022 18:56:58 +0430 Subject: [PATCH] fix: improve test resiliance --- .../User/UI/API/Tests/Functional/UpdateUserTest.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/Containers/AppSection/User/UI/API/Tests/Functional/UpdateUserTest.php b/app/Containers/AppSection/User/UI/API/Tests/Functional/UpdateUserTest.php index d9ef07a21..7176002e8 100644 --- a/app/Containers/AppSection/User/UI/API/Tests/Functional/UpdateUserTest.php +++ b/app/Containers/AppSection/User/UI/API/Tests/Functional/UpdateUserTest.php @@ -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', @@ -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() ); }