function ShortcutSetsTestCase::testShortcutSetUnassign

7.x shortcut.test ShortcutSetsTestCase::testShortcutSetUnassign()

Tests unassigning a shortcut set.

File

drupal-7.x/modules/shortcut/shortcut.test, line 343
Tests for shortcut.module.

Class

ShortcutSetsTestCase
Defines shortcut set test cases.

Code

function testShortcutSetUnassign() {
  $new_set = $this->generateShortcutSet($this->randomName(10));

  shortcut_set_assign_user($new_set, $this->shortcut_user);
  shortcut_set_unassign_user($this->shortcut_user);
  $current_set = shortcut_current_displayed_set($this->shortcut_user);
  $default_set = shortcut_default_set($this->shortcut_user);
  $this->assertTrue($current_set->set_name == $default_set->set_name, "Successfully unassigned another user's shortcut set.");
}