You are here

public function AssetInjectorJsTest::testJsPermissionGranted in Asset Injector 8.2

Tests a user WITH permission has access.

Throws

\Exception

2 calls to AssetInjectorJsTest::testJsPermissionGranted()
AssetInjectorJsTest::testJsInjector in tests/src/Functional/AssetInjectorJsTest.php
Test a created css injector is added to the page and the css file exists.
AssetInjectorJsTest::testSaveContinue in tests/src/Functional/AssetInjectorJsTest.php
Tests if the save and continue button works accurately.

File

tests/src/Functional/AssetInjectorJsTest.php, line 66

Class

AssetInjectorJsTest
Class AssetInjectorJsTest.

Namespace

Drupal\Tests\asset_injector\Functional

Code

public function testJsPermissionGranted() {
  $account = $this
    ->drupalCreateUser([
    'administer js assets injector',
  ]);
  $this
    ->drupalLogin($account);
  $this
    ->drupalGet('admin/config/development/asset-injector/js');
  $this
    ->assertSession()
    ->statusCodeEquals(200);
}