You are here

public function AgreementCustomUnprivilegedUserTestCase::testAgreement in Agreement 6.2

Same name and namespace in other branches
  1. 7.2 agreement.test \AgreementCustomUnprivilegedUserTestCase::testAgreement()

File

./agreement.test, line 206
Tests for Agreement module.

Class

AgreementCustomUnprivilegedUserTestCase

Code

public function testAgreement() {
  variable_set('agreement_page_visibility_settings', 1);
  variable_set('agreement_page_visibility_pages', '<front>');
  $this
    ->unprivilegedUserLogin();

  // Not sent to agreement page
  $this
    ->isNotAgreementPage();

  // Go to front page, open agreement
  $this
    ->drupalGet('node');
  $this
    ->isAgreementPage();

  // Go anywhere else, no agreement
  $this
    ->drupalGet('user/' . $this->unprivileged_user->uid);
  $this
    ->isNotAgreementPage();
}