You are here

public function AdsTxtTest::testAdsTxtAdminAccess in AdsTxt 8

Checks that an administrator can view the configuration page.

File

tests/src/Functional/AdsTxtTest.php, line 34

Class

AdsTxtTest
Tests functionality of configured ads.txt files.

Namespace

Drupal\Tests\adstxt\Functional

Code

public function testAdsTxtAdminAccess() {

  // Create user.
  $this->admin_user = $this
    ->drupalCreateUser([
    'administer ads.txt',
  ]);
  $this
    ->drupalLogin($this->admin_user);
  $this
    ->drupalGet('admin/config/system/adstxt');
  $this
    ->assertSession()
    ->fieldExists('edit-adstxt-content');
}