function RadioactivityNodeTestCase::testActions_commentAutoApproval in Radioactivity 6
File
- plugins/
radioactivity_node.test, line 94
Class
Code
function testActions_commentAutoApproval() {
$this
->setCommentPreview(FALSE);
$node = $this
->drupalCreateNode(array(
'type' => 'story',
));
$user = $this
->drupalCreateUser(array(
'access content',
'access comments',
'post comments',
));
$this
->drupalLogin($user);
$edit = array();
$edit['subject'] = 'subject';
$edit['comment'] = 'comment';
$this
->drupalPost('comment/reply/' . $node->nid, $edit, t('Save'));
$match = array();
$dbresult = db_query("SELECT energy FROM {radioactivity} WHERE decay_profile=1 AND class='node' AND id=%d", $node->nid);
$energy = db_result($dbresult);
$this
->assertEqual(1111, $energy, t('Check energy after comment submit (autoapproved)'));
}