Index: tests/image.test
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/image/tests/image.test,v
retrieving revision 1.4
diff -u -r1.4 image.test
--- tests/image.test	9 Mar 2009 02:24:34 -0000	1.4
+++ tests/image.test	5 Apr 2009 16:25:46 -0000
@@ -79,6 +79,11 @@
     $node = node_load(array('title' => $edit['title']));
     $this->assertTrue($node, t('Image node is found in database.'));
 
+    
+    $file_result = db_query("SELECT * FROM {image} i INNER JOIN {files} f ON i.fid = f.fid WHERE i.nid = %d AND i.image_size = '_original'", $node->nid);
+    $file = db_fetch_object($file_result);
+    $this->assertTrue($file->filename == $this->image, t('Files table has correct filename.'));
+    
     // Display an image.
     $this->drupalGet('node/' . $node->nid, array('query' => 'size=_original'));
     $this->assertPattern('@<img[^>]+?' . $node->images['_original'] . '[^>]+?>@', t('Original image displayed on the page.'));
