diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-08-22 10:01:06 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-08-22 10:01:06 +0000 |
commit | c72614b01e595eb52e60905fafa74e05ddbe5f9d (patch) | |
tree | fed20b356055d80188759ae2eb4fef809424ad32 /modules/comment/comment.test | |
parent | ff836870d80f5e1703990e8823bac1e506d96ce1 (diff) | |
download | brdo-c72614b01e595eb52e60905fafa74e05ddbe5f9d.tar.gz brdo-c72614b01e595eb52e60905fafa74e05ddbe5f9d.tar.bz2 |
#845774 by aaronbauman, sun: Fixed Regression: Anonymous users can post comments in the name of registered users.
Diffstat (limited to 'modules/comment/comment.test')
-rw-r--r-- | modules/comment/comment.test | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/modules/comment/comment.test b/modules/comment/comment.test index 54a39bf01..ba28b6ac2 100644 --- a/modules/comment/comment.test +++ b/modules/comment/comment.test @@ -521,6 +521,16 @@ class CommentAnonymous extends CommentHelperCase { $anonymous_comment2 = $this->postComment($this->node, $this->randomName(), $this->randomName()); $this->assertTrue($this->commentExists($anonymous_comment2), t('Anonymous comment with contact info (optional) found.')); + // Ensure anonymous users cannot post in the name of registered users. + $edit = array( + 'name' => $this->admin_user->name, + 'mail' => $this->randomName() . '@example.com', + 'subject' => $this->randomName(), + 'comment_body[' . LANGUAGE_NONE . '][0][value]' => $this->randomName(), + ); + $this->drupalPost('comment/reply/' . $this->node->nid, $edit, t('Save')); + $this->assertText(t('The name you used belongs to a registered user.')); + // Require contact info. $this->drupalLogin($this->admin_user); $this->setCommentAnonymous('2'); |