diff --git a/tests/scheduler.test b/tests/scheduler.test
index d85bd08..4398ff3 100644
--- a/tests/scheduler.test
+++ b/tests/scheduler.test
@@ -1368,4 +1368,154 @@ class SchedulerRulesTest extends SchedulerTestBase {
     $this->assertText($message8, '"' . $message8 . '" is shown');
   }
 
+  /**
+   * Helper function to check which events have been triggered.
+   *
+   * @param array $expected
+   *   Array of integers to indicate which messages (1-6) should be seen.
+   */
+  private function checkEventText(array $expected = array()) {
+    for ($i = 1; $i <= 6; $i++) {
+      $message = $this->eventMessage[$i];
+      if (in_array($i, $expected)) {
+        $this->assertText($message, 'Event message "' . $message . '" is shown');
+      }
+      else {
+        $this->assertNoText($message, 'Event message "' . $message . '" is not shown');
+      }
+    }
+  }
+
+  /**
+   * Tests the six events provided by Scheduler.
+   *
+   * This class tests all six events provided by Scheduler, by creating six
+   * rules which are all active throughout the test. They are all checked in
+   * this one test class to make the tests stronger, as this will show not only
+   * that the correct events are triggered in the right places, but also
+   * that they are not triggered in the wrong places.
+   */
+  public function testRulesEvents() {
+
+    // Create six reaction rules, one for each event that Scheduler triggers.
+    $rule_data = array(
+      1 => array('scheduler_new_node_is_scheduled_for_publishing_event', 'A new node is created and is scheduled for publishing.'),
+      2 => array('scheduler_existing_node_is_scheduled_for_publishing_event', 'An existing node is saved and is scheduled for publishing.'),
+      3 => array('scheduler_node_has_been_published_event', 'Scheduler has published this node during cron.'),
+      4 => array('scheduler_new_node_is_scheduled_for_unpublishing_event', 'A new node is created and is scheduled for unpublishing.'),
+      5 => array('scheduler_existing_node_is_scheduled_for_unpublishing_event', 'An existing node is saved and is scheduled for unpublishing.'),
+      6 => array('scheduler_node_has_been_unpublished_event', 'Scheduler has unpublished this node during cron.'),
+    );
+    foreach ($rule_data as $i => $values) {
+      list($event_name, $description) = $values;
+      $rule = rules_reaction_rule();
+      $this->eventMessage[$i] = 'RULE ' . $i . '. ' . $description;
+      $rule->event($event_name)
+        ->action('drupal_message', array('message' => $this->eventMessage[$i]));
+      $rule->access();
+      $rule->integrityCheck();
+      $rule->save('rule_id_' . $i, $this->eventMessage[$i]);
+    }
+
+    $this->drupalLogin($this->adminUser);
+
+    // Create a node without any scheduled dates, using node/add/page not
+    // drupalCreateNode(), and check that no events are triggered.
+    $edit = array(
+      'title' => 'Test for no events on creation',
+      'body[' . LANGUAGE_NONE . '][0][value]' => $this->randomString(30),
+    );
+    $this->drupalPost('node/add/page', $edit, t('Save'));
+    $node = $this->drupalGetNodeByTitle($edit['title']);
+    $this->checkEventText();
+
+    // Edit the node and check that no events are triggered.
+    $edit = array(
+      'title' => 'Test for no events on edit',
+      'body[' . LANGUAGE_NONE . '][0][value]' => $this->randomString(30),
+    );
+    $this->drupalPost('node/' . $node->nid . '/edit', $edit, t('Save'));
+    $this->checkEventText();
+
+    // Create a new node with a publish-on date, and check that only event 1 is
+    // triggered. Use time() not REQUEST_TIME to guarantee the datetime is in
+    // the future but only by a few seconds.
+    $edit = array(
+      'title' => 'Create node with publish-on date',
+      'publish_on' => date('Y-m-d H:i:s', time() + 3),
+      'body[' . LANGUAGE_NONE . '][0][value]' => $this->randomString(30),
+    );
+    $this->drupalPost('node/add/page', $edit, t('Save'));
+    $node = $this->drupalGetNodeByTitle($edit['title']);
+    $this->checkEventText(array(1));
+
+    // Edit this node and check that only event 2 is triggered.
+    $edit = array(
+      'title' => 'Edit node with publish-on date',
+      'body[' . LANGUAGE_NONE . '][0][value]' => $this->randomString(30),
+    );
+    $this->drupalPost('node/' . $node->nid . '/edit', $edit, t('Save'));
+    $this->checkEventText(array(2));
+
+    // Delay before running cron to ensure that the date will be in the past, so
+    // that the node gets processed. Then assert that only event 3 is triggered.
+    sleep(5);
+    $this->cronRun();
+    $this->drupalGet('admin/reports/dblog');
+    $this->checkEventText(array(3));
+
+    // Create a new node with an unpublish-on date, and check that only event 4
+    // is triggered.
+    $edit = array(
+      'title' => 'Create node with unpublish-on date',
+      'unpublish_on' => date('Y-m-d H:i:s', time() + 3),
+      'body[' . LANGUAGE_NONE . '][0][value]' => $this->randomString(30),
+    );
+    $this->drupalPost('node/add/page', $edit, t('Save'));
+    $node = $this->drupalGetNodeByTitle($edit['title']);
+    $this->checkEventText(array(4));
+
+    // Edit this node and check that only event 5 is triggered.
+    $edit = array(
+      'title' => 'Edit node with unpublish-on date',
+      'body[' . LANGUAGE_NONE . '][0][value]' => $this->randomString(30),
+    );
+    $this->drupalPost('node/' . $node->nid . '/edit', $edit, t('Save'));
+    $this->checkEventText(array(5));
+
+    // Delay before running cron to ensure that the date will be in the past, so
+    // that the node gets processed. Then assert that event 6 is triggered.
+    sleep(5);
+    $this->cronRun();
+    $this->drupalGet('admin/reports/dblog');
+    $this->checkEventText(array(6));
+
+    // Create a new node with both publish-on and unpublish-on dates, and check
+    // that events 1 and event 4 are both triggered.
+    $edit = array(
+      'title' => 'Create node with both dates',
+      'publish_on' => date('Y-m-d H:i:s', time() + 3),
+      'unpublish_on' => date('Y-m-d H:i:s', time() + 4),
+      'body[' . LANGUAGE_NONE . '][0][value]' => $this->randomString(30),
+    );
+    $this->drupalPost('node/add/page', $edit, t('Save'));
+    $node = $this->drupalGetNodeByTitle($edit['title']);
+    $this->checkEventText(array(1, 4));
+
+    // Edit this node and check that events 2 and 5 are triggered.
+    $edit = array(
+      'title' => 'Edit node with both dates',
+      'body[' . LANGUAGE_NONE . '][0][value]' => $this->randomString(30),
+    );
+    $this->drupalPost('node/' . $node->nid . '/edit', $edit, t('Save'));
+    $this->checkEventText(array(2, 5));
+
+    // Delay before running cron to ensure that the dates will be in the past.
+    // Then assert that events 3, 5 & 6 are triggered.
+    sleep(6);
+    $this->cronRun();
+    $this->drupalGet('admin/reports/dblog');
+    $this->checkEventText(array(3, 5, 6));
+  }
+
 }
