You are here

public function FppServicesTest::testFppCreateFail in Fieldable Panels Panes (FPP) 7

Tests FPP resource Created.

Make sure it fails with no permissions.

File

tests/fpp.services.test, line 224
Tests the services resource Fieldable Panels Pane methods and actions.

Class

FppServicesTest
Test the services resource Fieldable Panels Pane methods and actions.

Code

public function testFppCreateFail() {
  $privileged_user = $this
    ->drupalCreateUser(array(
    'administer services',
  ));
  $this
    ->drupalLogin($privileged_user);
  $fpp = array(
    'title' => 'Tests',
    'bundle' => 'fieldable_panels_pane',
  );
  $responseArray = $this
    ->servicesPost($this->endpoint->path . '/fieldable_panels_panes', $fpp);
  $this
    ->assertEqual($responseArray['code'], 403, 'User with not sufficient permissions cannot create fieldable panels pane', 'fppResource: Create');
}