Improve test case

This commit is contained in:
Marcus Moore 2024-05-28 13:02:44 -07:00
parent 7d2af61989
commit 71bab2c315
No known key found for this signature in database

View file

@ -2,6 +2,7 @@
namespace Tests\Feature\Api\Groups;
use App\Helpers\Helper;
use App\Models\Group;
use App\Models\User;
use Tests\TestCase;
@ -49,10 +50,15 @@ class GroupStoreTest extends TestCase
$this->assertNotNull($group);
$this->assertEquals(
Helper::selectedPermissionsArray(config('permissions'), config('permissions')),
$group->decodePermissions(),
'Default group permissions were not set as expected',
);
$this->actingAsForApi($superuser)
->getJson(route('api.groups.show', ['group' => $group]))
->assertOk();
}
public function testStoringGroupWithInvalidPermissionDropsBadPermission()