Index: modules/node/node.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.module,v
retrieving revision 1.1066
diff -u -r1.1066 node.module
--- modules/node/node.module	5 Jun 2009 05:28:28 -0000	1.1066
+++ modules/node/node.module	5 Jun 2009 17:56:09 -0000
@@ -789,7 +789,7 @@
  * @param $hook
  *   A string containing the name of the hook.
  * @return
- *   TRUE iff the $hook exists in the node type of $node.
+ *   TRUE if the $hook exists in the node type of $node.
  */
 function node_hook($node, $hook) {
   $base = node_type_get_base($node);
@@ -2870,7 +2870,7 @@
   }
   else {
     // Not using any node_access modules. Add the default grant.
-    db_insert('node_accesss')
+    db_insert('node_access')
       ->fields(array(
         'nid' => 0,
         'realm' => 'all',
Index: modules/node/node.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.test,v
retrieving revision 1.28
diff -u -r1.28 node.test
--- modules/node/node.test	4 Jun 2009 03:33:28 -0000	1.28
+++ modules/node/node.test	5 Jun 2009 17:56:09 -0000
@@ -833,3 +833,31 @@
     $this->assertEqual($node_types['page']->base, node_type_get_base('page'), t('Correct node type base has been returned.'));
   }
 }
+
+/**
+ * Rebuild the node_access table.
+ */
+class NodeAccessRebuildTestCase extends DrupalWebTestCase {
+  function getInfo() {
+    return array(
+      'name' => t('Node access rebuild'),
+      'description' => t('Ensures that node access rebuild functions work correctly.'),
+      'group' => t('Node'),
+    );
+  }
+  
+  function setUp() {
+    parent::setUp();
+
+    $web_user = $this->drupalCreateUser(array('administer site configuration', 'access administration pages', 'access site reports'));
+    $this->drupalLogin($web_user);
+    $this->web_user = $web_user;
+  }
+  
+  function testNodeAccessRebuild() {
+    $this->drupalGet('admin/reports/status');
+    $this->clickLink(t('Rebuild Permissions'));
+    $this->drupalPost(NULL, array(), t('Rebuild permissions'));
+    $this->assertText(t('Content permissions have been rebuilt.'));
+  }
+}
