You are here

public function ServicesViewsSecurityUpgradePathTest::testCloneUpgradeComplain in Services Views 7

Test the upgrade complains when no displays are blacklisted.

File

tests/services_views_upgrade_path.test, line 128
Security upgrade tests for the Services Views module.

Class

ServicesViewsSecurityUpgradePathTest
Api call tests for the security upgrade from 1.2 to 1.3.

Code

public function testCloneUpgradeComplain() {
  $prefix = "services_views_" . $this->endpoint->name;
  variable_set($prefix . '_white_list', 0);
  variable_set($prefix . "_view_displays", array());
  services_views_convert_white_list_to_clones();
  $this
    ->assertEqual($_SESSION['messages']['warning'][0], 'Cowardly refusing to make a clone of all view displays. Please configure the specific views you would like to have cloned in the ' . $this->endpoint->name . ' endpoint. There will be no new views cloned over to a Services display. If all displays need to be cloned, restore to the latest backup, and update your settings white list them all and try again.');
}