You are here

public function ExtlinkAdminTestCase::testAdminAccess in External Links 7

Test access to the admin pages.

File

tests/extlink.test, line 77
External Link tests.

Class

ExtlinkAdminTestCase
Test Case for External Links administration functionality.

Code

public function testAdminAccess() {
  $this
    ->drupalLogin($this->normalUser);
  $this
    ->drupalGet(self::EXTLINK_ADMIN_PATH);
  $this
    ->assertText(t('Access denied'), 'Normal users should not be able to access the External Links admin pages', 'External Links');
  $this
    ->drupalLogin($this->adminUser);
  $this
    ->drupalGet(self::EXTLINK_ADMIN_PATH);
  $this
    ->assertNoText(t('Access denied'), 'Admin users should be able to access the External Links admin pages', 'External Links');
}