fix roles_inherited return #274
This commit is contained in:
parent
5966d31f62
commit
9a2078dd19
|
@ -432,6 +432,7 @@ class REST_Roles_Controller extends REST_Controller {
|
|||
'slug' => $slug,
|
||||
'name' => translate_user_role($role['name']),
|
||||
];
|
||||
continue;
|
||||
}
|
||||
|
||||
// inherited roles
|
||||
|
|
|
@ -238,6 +238,9 @@ class TAINACAN_REST_Roles_Controller extends TAINACAN_UnitApiTestCase {
|
|||
$this->assertArrayHasKey('test', $caps['tnc_rep_edit_metadata']['roles']);
|
||||
$this->assertArrayHasKey('editor', $caps['tnc_rep_edit_metadata']['roles_inherited']);
|
||||
|
||||
$this->assertArrayNotHasKey('editor', $caps['manage_tainacan']['roles_inherited']);
|
||||
$this->assertArrayNotHasKey('administrator', $caps['manage_tainacan']['roles_inherited']);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue