You are here

public function LingotekAccountTest::testDashboardIsNotAvailableBeforeConnecting in Lingotek Translation 8

Tests that the dashboard cannot be accessed without a valid user.

File

src/Tests/LingotekAccountTest.php, line 52
Contains \Drupal\lingotek\Tests\LingotekDashboardTest.

Class

LingotekAccountTest
Tests the Lingotek dashboard.

Namespace

Drupal\lingotek\Tests

Code

public function testDashboardIsNotAvailableBeforeConnecting() {

  // Login as admin.
  $this
    ->drupalLogin($this->rootUser);

  // Try to navigate to the Dashboard page, and assert we are redirected.
  $this
    ->drupalGet('admin/lingotek');
  $this
    ->assertUrl('admin/lingotek/setup/account');
  $this
    ->assertLink('Connect Lingotek Account');
}