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 13:40:09 -0000
@@ -229,6 +229,28 @@ 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');
+    $hook = 'user_register';
+    $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'));
+
+    // Using a hidden 'hook' field to assign a specific hook.
+    $edit = array('aid' => md5('1'), 'hook' => $hook);
+    $this->drupalPost('admin/structure/trigger/user', $edit, t('Assign'));
+
+    // Verify that the trigger's hook has assigned action.
+    $actions = trigger_get_assigned_actions($hook);
+    $this->assertEqual(1, count($actions), t('Action assigned'));
+    $this->assertEqual($actions[1]->label, $action_label, t('Action label equal'));
   }
 
   /**
Index: modules/simpletest/drupal_web_test_case.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/simpletest/drupal_web_test_case.php,v
retrieving revision 1.158
diff -u -p -r1.158 drupal_web_test_case.php
--- modules/simpletest/drupal_web_test_case.php	11 Oct 2009 03:07:19 -0000	1.158
+++ modules/simpletest/drupal_web_test_case.php	11 Oct 2009 13:40:10 -0000
@@ -1621,6 +1621,11 @@ class DrupalWebTestCase extends DrupalTe
             $upload[$name] = $edit[$name];
             unset($edit[$name]);
             break;
+          case 'hidden':
+            if ($edit[$name] == $value) {
+              unset($edit[$name]);
+            }
+            break;
         }
       }
       if (!isset($post[$name]) && !$done) {
