You are here

function ServicesResourceDisabledTest::testResourceDisabled in Services 7.3

Assert resource is disabled.

File

tests/functional/ServicesResourceDisabledTests.test, line 90
Contains tests when a resource is disabled.

Class

ServicesResourceDisabledTest
Try to make a request to a disabled resource.

Code

function testResourceDisabled() {
  $path = $this->endpoint->path;

  // Call as authenticated user.
  $response = $this
    ->servicesPost($path . '/system/connect');
  $this
    ->assertEqual($response['code'], 404, format_string('Services returned not found response code for disabled resource: %code.', array(
    '%code' => $response['code'],
  )));
  $this
    ->drupalLogout();
}