You are here

public function RoleWatchdogTest::testViewPagesLoad in Role Watchdog 8

Tests working of view pages for user with appropriate permission.

File

tests/src/Functional/RoleWatchdogTest.php, line 57

Class

RoleWatchdogTest
Tests to ensure working of Role Watchdog modules.

Namespace

Drupal\Tests\role_watchdog\Functional

Code

public function testViewPagesLoad() {
  $authenticated_user = $this
    ->createUser([
    'access role_watchdog reports',
  ]);
  $this
    ->drupalLogin($authenticated_user);
  $uri = 'internal:/user/' . $authenticated_user
    ->id() . '/track-grants';
  $this
    ->drupalGet(Url::fromUri($uri));
  $this
    ->assertSession()
    ->statusCodeEquals(200);
}