1.20.x comment.test | public CommentFieldsTest::testCommentDeletedBody() |
Tests that the comment_body field is not required.
It should be possible to preview and save a comment without the default "comment_body" field and without generating warnings.
File
- modules/
comment/ tests/ comment.test, line 2018 - Tests for the Comment module.
Class
- CommentFieldsTest
- Tests fields on comments.
Code
public function testCommentDeletedBody() {
// Delete the comment_body field.
$this->backdropLogin($this->admin_user);
$this->backdropPost('admin/structure/types/manage/post/comment/fields/comment_body/delete', array(), t('Delete'));
// Preview an empty comment.
$this->backdropPost('node/' . $this->node->nid, array(), t('Preview'));
// Post an empty comment.
$this->backdropPost('node/' . $this->node->nid, array(), t('Save'));
// View the comment administration overview page.
$this->backdropGet('admin/content/comment');
}