1 menu.test | public MenuTestCase::testMenuParentsJsAccess() |
Test administrative users other than user 1 can access the menu parents AJAX callback.
File
- core/
modules/ menu/ tests/ menu.test, line 578 - Tests for menu.module.
Class
Code
public function testMenuParentsJsAccess() {
$admin = $this->backdropCreateUser(array('administer menu'));
$this->backdropLogin($admin);
// Just check access to the callback overall, the POST data is irrelevant.
$this->backdropGet('admin/structure/menu/parents');
$this->assertResponse(200);
// Do standard user tests.
$this->backdropLogin($this->std_user);
$this->backdropGet('admin/structure/menu/parents');
$this->assertResponse(403);
}