Index: modules/user/user.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.test,v
retrieving revision 1.28
diff -u -p -r1.28 user.test
--- modules/user/user.test	9 Feb 2009 07:36:15 -0000	1.28
+++ modules/user/user.test	10 Feb 2009 09:10:21 -0000
@@ -963,3 +963,39 @@ class UserBlocksUnitTests extends Drupal
     $this->assertEqual(db_query("SELECT COUNT(*) FROM {sessions} WHERE uid = :uid AND sid = :sid AND timestamp = :timestamp", array(':uid' => $fields['uid'], ':sid' => $fields['sid'], ':timestamp' => $fields['timestamp']))->fetchField(), 1, t('Session record inserted.'));
   }
 }
+
+/**
+ * Link to a node author's profile should lead to the author's profile page.
+ */
+class UserProfileLinksFunctionalTest extends DrupalWebTestCase {
+  function getInfo() {
+    return array(
+      'name' => t('User profile links'),
+      'description' => t("Link to a node author's profile should lead to the author's profile page."),
+      'group' => t('User')
+    );
+  }
+
+  /**
+   * Registers a user and deletes it.
+   */
+  function testUserProfileLink() {
+
+    $user_a = $this->drupalCreateUser(array('create article content'));
+    $user_b = $this->drupalCreateUser(array('access content', 'access user profiles'));
+
+    // user A creates a node.
+    $this->drupalLogin($user_a);
+    $edit = array();
+    $edit['title'] = $this->randomName(8);
+    $edit['body'] = $this->randomName(16);
+    $this->drupalPost('node/add/article', $edit, t('Save'));
+	$node = $this->drupalGetNodeByTitle($edit['title']);
+	
+	// user B views the node
+    $this->drupalLogin($user_b);
+	$this->drupalGet("node/$node->nid");
+	$this->assertRaw(t("View user profile."), t("User profile link found."));
+	$this->assertRaw("user/$user_a->uid", t("Author's UID found."));
+  }
+}
\ No newline at end of file
