diff options
author | webchick <webchick@24967.no-reply.drupal.org> | 2011-05-28 11:17:20 -0700 |
---|---|---|
committer | webchick <webchick@24967.no-reply.drupal.org> | 2011-05-28 11:17:20 -0700 |
commit | e9602e12d07e74168f2fff14f1cc9a14df99662d (patch) | |
tree | b6951979c896c509efa4da71e380b290bec8d3ed /modules/update | |
parent | b6e430d0e66a5fd9946c1d6c7a62b039d445a3cd (diff) | |
download | brdo-e9602e12d07e74168f2fff14f1cc9a14df99662d.tar.gz brdo-e9602e12d07e74168f2fff14f1cc9a14df99662d.tar.bz2 |
Issue #647964 by jergason, bfroehle, Damien Tournoud, corbacho, Pancho: Fixed Running cron does not check for available updates.
Diffstat (limited to 'modules/update')
-rw-r--r-- | modules/update/update.module | 1 | ||||
-rw-r--r-- | modules/update/update.test | 31 |
2 files changed, 23 insertions, 9 deletions
diff --git a/modules/update/update.module b/modules/update/update.module index a66cfa512..a2d705a0e 100644 --- a/modules/update/update.module +++ b/modules/update/update.module @@ -293,6 +293,7 @@ function update_cron() { // the cached data for all projects, attempt to re-fetch, and trigger any // configured notifications about the new status. update_refresh(); + update_fetch_data(); _update_cron_notify(); } else { diff --git a/modules/update/update.test b/modules/update/update.test index 6f9ef08ed..f0c214ed6 100644 --- a/modules/update/update.test +++ b/modules/update/update.test @@ -134,6 +134,19 @@ class UpdateCoreTestCase extends UpdateTestHelper { } /** + * Check that running cron updates the list of available updates. + */ + function testModulePageRunCron() { + $this->setSystemInfo7_0(); + variable_set('update_fetch_url', url('update-test', array('absolute' => TRUE))); + variable_set('update_test_xml_map', array('drupal' => '0')); + + $this->cronRun(); + $this->drupalGet('admin/modules'); + $this->assertNoText(t('No update information available.')); + } + + /** * Check the messages at admin/modules when the site is up to date. */ function testModulePageUpToDate() { @@ -142,10 +155,10 @@ class UpdateCoreTestCase extends UpdateTestHelper { variable_set('update_fetch_url', url('update-test', array('absolute' => TRUE))); variable_set('update_test_xml_map', array('drupal' => '0')); - $this->drupalGet('admin/modules'); - $this->assertText(t('No update information available.')); - $this->clickLink(t('check manually')); + $this->drupalGet('admin/reports/updates'); + $this->clickLink(t('Check manually')); $this->assertText(t('Checked available update data for one project.')); + $this->drupalGet('admin/modules'); $this->assertNoText(t('There are updates available for your version of Drupal.')); $this->assertNoText(t('There is a security update available for your version of Drupal.')); } @@ -159,10 +172,10 @@ class UpdateCoreTestCase extends UpdateTestHelper { variable_set('update_fetch_url', url('update-test', array('absolute' => TRUE))); variable_set('update_test_xml_map', array('drupal' => '1')); - $this->drupalGet('admin/modules'); - $this->assertText(t('No update information available.')); - $this->clickLink(t('check manually')); + $this->drupalGet('admin/reports/updates'); + $this->clickLink(t('Check manually')); $this->assertText(t('Checked available update data for one project.')); + $this->drupalGet('admin/modules'); $this->assertText(t('There are updates available for your version of Drupal.')); $this->assertNoText(t('There is a security update available for your version of Drupal.')); } @@ -176,10 +189,10 @@ class UpdateCoreTestCase extends UpdateTestHelper { variable_set('update_fetch_url', url('update-test', array('absolute' => TRUE))); variable_set('update_test_xml_map', array('drupal' => '2-sec')); - $this->drupalGet('admin/modules'); - $this->assertText(t('No update information available.')); - $this->clickLink(t('check manually')); + $this->drupalGet('admin/reports/updates'); + $this->clickLink(t('Check manually')); $this->assertText(t('Checked available update data for one project.')); + $this->drupalGet('admin/modules'); $this->assertNoText(t('There are updates available for your version of Drupal.')); $this->assertText(t('There is a security update available for your version of Drupal.')); |