]> BookStack Code Mirror - bookstack/commitdiff
Updated test to have reliable check ordering
authorDan Brown <redacted>
Sat, 18 Feb 2023 19:01:38 +0000 (19:01 +0000)
committerDan Brown <redacted>
Sat, 18 Feb 2023 19:01:38 +0000 (19:01 +0000)
tests/Api/RolesApiTest.php

index e231c167cfc01e2355a269a95e15dc2097b914c1..515dabe68ff60b0adbd30948841f5adfa10db129 100644 (file)
@@ -133,7 +133,7 @@ class RolesApiTest extends TestCase
             'description'  => $role->description,
             'mfa_enforced' => $role->mfa_enforced,
             'external_auth_id' => $role->external_auth_id,
-            'permissions'  => $role->permissions()->pluck('name')->toArray(),
+            'permissions'  => $role->permissions()->orderBy('name', 'asc')->pluck('name')->toArray(),
             'users' => $role->users()->get()->map(function (User $user) {
                 return [
                     'id' => $user->id,