diff --git a/modules/system/system.test b/modules/system/system.test index 5ae3341612..f29a62239c 100644 --- a/modules/system/system.test +++ b/modules/system/system.test @@ -925,6 +925,22 @@ class CronRunTestCase extends DrupalWebTestCase { $this->assertEqual($result, 'success', 'Cron correctly handles exceptions thrown during hook_cron() invocations.'); } + /** + * Ensure that the manual cron run is working. + */ + function testManualCron() { + $admin_user = $this->drupalCreateUser(array('administer site configuration')); + $this->drupalLogin($admin_user); + + $this->drupalGet('admin/reports/status/run-cron'); + $this->assertResponse(403); + + $this->drupalGet('admin/reports/status'); + $this->clickLink(t('run cron manually')); + $this->assertResponse(200); + $this->assertText(t('Cron ran successfully.')); + } + /** * Tests that hook_flush_caches() is not invoked on every single cron run. *