You are here

public function FppPermissionsTest::testEditBundlePermission in Fieldable Panels Panes (FPP) 7

Confirm that the 'edit bundle' permission doesn't allow FPP creation.

File

tests/fpp.permissions.test, line 144
Tests for the Fieldable Panels Panes module to ensure the permissions work.

Class

FppPermissionsTest
Tests for the Fieldable Panels Panes module to ensure the permissions work.

Code

public function testEditBundlePermission() {

  // Create a user with edit permission.
  $permissions = array(
    "edit fieldable {$this->bundle}",
  );
  $this->user = $this
    ->createUser($permissions);
  $this
    ->drupalLogin($this->user);

  // Load the 'add' page.
  $this
    ->drupalGet('admin/structure/fieldable-panels-panes/' . $this->bundle . '/add');
  $this
    ->assertResponse(403, 'Cannot add a new FPP object.');
}