From 106e967eb094973da3e1032f31e3e9865efc2e37 Mon Sep 17 00:00:00 2001
From: Bradley M. Froehle <brad.froehle@gmail.com>
Date: Tue, 29 Mar 2011 16:31:40 -0700
Subject: [PATCH] Issue #647964 - Fixed running cron does not check for available updates.

---
 modules/update/update.module |    1 +
 modules/update/update.test   |   18 +++++++++---------
 2 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/modules/update/update.module b/modules/update/update.module
index 1008964..99f53d7 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 6f9ef08..db3b128 100644
--- a/modules/update/update.test
+++ b/modules/update/update.test
@@ -142,10 +142,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 +159,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 +176,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.'));
 
-- 
1.7.3.5

