Index: modules/trigger/trigger.test =================================================================== RCS file: /cvs/drupal/drupal/modules/trigger/trigger.test,v retrieving revision 1.19 diff -u -p -r1.19 trigger.test --- modules/trigger/trigger.test 11 Oct 2009 03:07:21 -0000 1.19 +++ modules/trigger/trigger.test 11 Oct 2009 10:27:04 -0000 @@ -229,6 +229,35 @@ class TriggerOtherTestCase extends Drupa // Reset the action variable. variable_set( $action_id, FALSE ); + + // Assign a configurable action 'Redirect to URL' to the user trigger. + $this->drupalLogin($test_user); + $hash = md5('system_goto_action'); + $url = 'node'; + $absolute_url = url($url, array('absolute' => TRUE)); + $action_label = $this->randomName(16); + $edit = array( + 'actions_label' => $action_label, + 'url' => $url, + ); + $this->drupalPost('admin/config/system/actions/configure/' . $hash, $edit, t('Save')); + $edit = array('aid' => md5('1')); + $this->drupalPost('admin/structure/trigger/user', $edit, t('Assign')); + + // Debug assigned actions. + $test = db_query("SELECT hook FROM {trigger_assignments}", array( + ))->fetchAll(); + debug($test); + + // Log in using the block. + $this->drupalLogout(); + $edit = array(); + $edit['name'] = $name; + $edit['pass'] = $pass; + $this->drupalPost('filter/tips', $edit, t('Log in')); + + // Verify that redirect happen. + $this->assertEqual($absolute_url, $this->url, t('Redirected successfully by the trigger.')); } /** Index: modules/system/system.module =================================================================== RCS file: /cvs/drupal/drupal/modules/system/system.module,v retrieving revision 1.804 diff -u -p -r1.804 system.module --- modules/system/system.module 10 Oct 2009 16:48:38 -0000 1.804 +++ modules/system/system.module 11 Oct 2009 10:27:04 -0000 @@ -2622,6 +2622,7 @@ function system_goto_action_submit($form } function system_goto_action($object, $context) { + unset($_GET['destination']); drupal_goto(token_replace($context['url'], $context)); }