function FeedbackTestCase::testFeedbackDelete in Feedback 7.2
Test feedback deletion.
File
- tests/
feedback.test, line 74 - Tests for Feedback module.
Class
- FeedbackTestCase
- Test basic Feedback functionality.
Code
function testFeedbackDelete() {
$this
->drupalLogin($this->admin_user);
$message = $this
->randomString();
$edit = array(
'message' => $message,
);
$this
->drupalPost('node', $edit, t('Send feedback'));
// Verify a delete link is shown.
$this
->drupalGet('admin/reports/feedback');
$this
->assertLinkByHref('admin/reports/feedback/1/delete');
// Verify deletion.
$this
->drupalPost('admin/reports/feedback/1/delete', array(), t('Delete'));
$this
->assertRaw(t('The feedback entry was deleted'), t('Feedback deletion message shown.'));
$this
->assertNoLinkByHref('admin/reports/feedback/1/delete');
$this
->assertNoRaw(check_plain($message), t('Message not found.'));
}