Test permissions update

This commit is contained in:
Marcus Moore 2023-09-07 13:21:27 -07:00
parent 39ff575ac1
commit a7a70f6981

View file

@ -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);