Index: feedapi_node/tests/feedapi_node.module.test
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/feedapi/feedapi_node/tests/Attic/feedapi_node.module.test,v
retrieving revision 1.1.4.26
diff -u -p -r1.1.4.26 feedapi_node.module.test
--- feedapi_node/tests/feedapi_node.module.test	11 Aug 2009 07:05:13 -0000	1.1.4.26
+++ feedapi_node/tests/feedapi_node.module.test	11 Aug 2009 10:11:56 -0000
@@ -450,7 +450,7 @@ EOT;
     $this->create_type(array_pop($this->get_parsers()));
     $settings = feedapi_get_settings($this->info->type);
     $this->feedapi_user();
-    $feed_url = "http://novaak.net/test_feed.rss?". $this->randomName();
+    $feed_url = "http://novaak.net/test_feed.php";
     $edit = array(
       'feedapi[feedapi_url]' => $feed_url,
     );
@@ -461,36 +461,29 @@ EOT;
     $notification = str_replace('<em>', '', $notification);
     $notification = str_replace('</em>', '', $notification);
     $this->assertText($notification, 'The proper number of items were created');
-    
-    // Get one item's nid and guid
-    $existing_item = db_fetch_array(db_query_range('SELECT nid, guid, url from {feedapi_node_item} fi join {feedapi_node_item_feed} fif ON fi.nid = fif.feed_item_nid WHERE fif.feed_nid = %d', $node->nid, 1, 1));
-    
+
+    $title = $this->randomName(20);
+    $feed_url_new = "http://novaak.net/test_feed.php?title=$title";
     
     $sticky = db_result(db_query("SELECT sticky FROM {node} WHERE nid = %d", $existing_item['nid']));
     $this->assertTrue(!$sticky, 'The sticky bit is off by default.');
     
-    // Set the sticky to 1 on the item
-    db_query("UPDATE {node} SET sticky = 1 WHERE nid = %d", $existing_item['nid']);
+    // Set the sticky to 1 on all the nodes item
+    db_query("UPDATE {node} SET sticky = 1");
     
-    $item = new stdClass();
-    $item->nid = 
-    $item->title = $this->randomName(59);
-    $item->description = $this->randomName(666);
-    $item->options = new stdClass();
-    $item->options->guid = $existing_item['guid'];
-    $item->options->original_url = $existing_item['url'];
-    $item->options->timestamp = time();
-    module_invoke('feedapi_node', 'feedapi_item', 'update', $item, $node->nid, $settings['processors']['feedapi_node'], $existing_item['nid']);
+    // Invalidate current data and change the url
+    db_query("UPDATE {feedapi} SET hash = '%s', url='%s' WHERE nid = %d", $this->randomName(5), $feed_url_new, $node->nid);
+
+    $this->drupalGet("node/{$node->nid}/refresh");
     
-    $sticky = db_result(db_query("SELECT sticky FROM {node} WHERE nid = %d", $existing_item['nid']));
-    $this->assertTrue($sticky, 'The sticky bit remained the same just as before the update');
+    $not_sticky = db_result(db_query("SELECT COUNT(*) FROM {node} WHERE sticky = 0"));
+    $this->assertTrue($not_sticky == 0, 'The sticky bit remained the same just as before the update');
     
-    $this->drupalGet('node/'. $existing_item['nid']);
-    $this->assertText($item->title, 'The item node update was successful');
-    $this->assertText($item->description, 'The item node update was successful');
+    $this->drupalGet('admin/content/node');
+    $this->assertText($title, 'The item node update was successful');
     
     $this->drupalGet('/');
-    $this->assertText($item->title, 'The item node really appears on the first page.');
+    $this->assertText($title, 'The item node really appears on the first page.');
     
   }
 
