From a7a70f6981496c6ccacc6c64be816de6d5e1f332 Mon Sep 17 00:00:00 2001 From: Marcus Moore Date: Thu, 7 Sep 2023 13:21:27 -0700 Subject: [PATCH] Test permissions update --- tests/Feature/Api/Users/UsersUpdateTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Feature/Api/Users/UsersUpdateTest.php b/tests/Feature/Api/Users/UsersUpdateTest.php index 00e77357c9..e05bfa81af 100644 --- a/tests/Feature/Api/Users/UsersUpdateTest.php +++ b/tests/Feature/Api/Users/UsersUpdateTest.php @@ -39,8 +39,7 @@ class UsersUpdateTest extends TestCase 'username' => 'mabel', 'password' => 'super-secret', 'email' => 'mabel@onlymurderspod.com', - // @todo: - // 'permissions' => '', + 'permissions' => '{"a.new.permission":"1"}', 'activated' => true, 'phone' => '619-555-5555', 'jobtitle' => 'Host', @@ -66,6 +65,7 @@ class UsersUpdateTest extends TestCase $this->assertEquals('mabel', $user->username); $this->assertTrue(Hash::check('super-secret', $user->password)); $this->assertEquals('mabel@onlymurderspod.com', $user->email); + $this->assertArrayHasKey('a.new.permission', $user->decodePermissions()); $this->assertTrue($user->activated); $this->assertEquals('619-555-5555', $user->phone); $this->assertEquals('Host', $user->jobtitle);