You are here

public function HoneypotFormTestCase::testProtectNodeFormPreviewPassthru in Honeypot 7

Test node form protection.

File

./honeypot.test, line 163
Testing for Honeypot module.

Class

HoneypotFormTestCase
Test the functionality of the Honeypot module for forms.

Code

public function testProtectNodeFormPreviewPassthru() {

  // Log in the admin user.
  $this
    ->drupalLogin($this->webUser);

  // Post a node form using the 'Preview' button and make sure it's allowed.
  $edit["title"] = 'Test Page';
  $this
    ->drupalPost('node/add/article', $edit, t('Preview'));
  $this
    ->assertNoText(t('There was a problem with your form submission.'), 'Honeypot not blocking node form previews.');
}