protected function AntispamNodeTest::testNodeModeration in AntiSpam 7
Tests antispam functionality for moderating comments.
File
- tests/
antispam.test, line 61 - Tests for antispam.module.
Class
- AntispamNodeTest
- Tests antispam functionality for nodes.
Code
protected function testNodeModeration() {
variable_set('antispam_node_publish_links', TRUE);
variable_set('antispam_node_spam_links', TRUE);
$langcode = LANGUAGE_NONE;
// Post a node as the admin user.
$this
->drupalLogin($this->adminUser);
$edit = array(
'title' => $this
->randomName(),
);
$this
->drupalPost('node/add/page', $edit, t('Save'));
$node = $this
->drupalGetNodeByTitle($edit['title']);
$this
->drupalGet('admin/content/antispam/nodes/published');
$this
->assertResponse(200);
$this
->assertText($edit['title'], 'Published node found.');
$this
->drupalGet('node/' . $node->nid);
$this
->clickLink(t('Spam'));
$this
->drupalGet('admin/content/antispam/nodes/spam');
$this
->assertResponse(200);
}