diff --git a/app/Containers/AppSection/User/Tests/Unit/UpdateUserTaskTest.php b/app/Containers/AppSection/User/Tests/Unit/UpdateUserTaskTest.php index b4a9072b7..3277b7eed 100644 --- a/app/Containers/AppSection/User/Tests/Unit/UpdateUserTaskTest.php +++ b/app/Containers/AppSection/User/Tests/Unit/UpdateUserTaskTest.php @@ -16,6 +16,19 @@ */ class UpdateUserTaskTest extends TestCase { + public function testUpdateUser(): void + { + $user = User::factory()->create(); + $data = [ + 'name' => 'new name', + ]; + + $updatedUser = app(UpdateUserTask::class)->run($data, $user->id); + + $this->assertEquals($user->id, $updatedUser->id); + $this->assertEquals($data['name'], $updatedUser->name); + } + public function testUpdateUserWithInvalidID(): void { $this->expectException(NotFoundException::class);