You are here

function FlagAccessLinkTestCase::testFlagAccessNone in Flag 7.3

Test that a user without flag access can't see the flag.

File

tests/flag.test, line 711
Tests for the Flag module.

Class

FlagAccessLinkTestCase
Access to flags using the basic flag link.

Code

function testFlagAccessNone() {

  // Create test user who can't flag at all.
  $no_flag_user = $this
    ->drupalCreateUser(array());
  $this
    ->drupalLogin($no_flag_user);

  // Look at our node.
  $this
    ->drupalGet('node/' . $this->nid);
  $this
    ->assertNoLink('Flag this item', 0, 'The flag link does not appear on the page');
}