You are here

public function ViewsAccessTestCase::testAccessPlugin in Spaces 7

Same name and namespace in other branches
  1. 6.3 tests/spaces.test \ViewsAccessTestCase::testAccessPlugin()
  2. 7.3 tests/spaces.test \ViewsAccessTestCase::testAccessPlugin()

File

tests/spaces.test, line 460

Class

ViewsAccessTestCase
Test for the Views acces plugin

Code

public function testAccessPlugin() {
  $this
    ->drupalLogin($this->admin_user);
  $this
    ->drupalGet('comments/recent');
  $this
    ->assertResponse('200', t('Authorized user allowed'));

  // For some reason this test fails, but works when click testing a site
  $this
    ->drupalLogin($this->basic_user);
  $this
    ->drupalGet('comments/recent');
  $this
    ->assertResponse('403', t('Unauthorized user blocked'));
}