function ShortcutSetsTestCase::testShortcutSetSwitchNoSetName in Drupal 7
Tests switching a user's shortcut set without providing a new set name.
File
- modules/shortcut/ shortcut.test, line 293 
- Tests for shortcut.module.
Class
- ShortcutSetsTestCase
- Defines shortcut set test cases.
Code
function testShortcutSetSwitchNoSetName() {
  $edit = array(
    'set' => 'new',
  );
  $this
    ->drupalPost('user/' . $this->admin_user->uid . '/shortcuts', $edit, t('Change set'));
  $this
    ->assertText(t('The new set name is required.'));
  $current_set = shortcut_current_displayed_set($this->admin_user);
  $this
    ->assertEqual($current_set->set_name, $this->set->set_name, 'Attempting to switch to a new shortcut set without providing a set name does not succeed.');
}