You are here

function ScaldBaseTestCase::testScaldAdmin in Scald: Media Management made easy 7

Test Scald admin.

File

tests/scald.test, line 150
Tests for scald.module.

Class

ScaldBaseTestCase
Test the Scald base functionality.

Code

function testScaldAdmin() {
  $web_user = $this
    ->drupalCreateUser(array());
  $this
    ->drupalLogin($web_user);
  $this
    ->drupalGet('admin/structure/scald');
  $this
    ->assertResponse(403, 'Normal user cannot administer Scald');
  $this
    ->drupalLogout();
  $admin_user = $this
    ->drupalCreateUser(array(
    'administer scald',
  ));
  $this
    ->drupalLogin($admin_user);
  $this
    ->drupalGet('admin/structure/scald');
  $this
    ->assertResponse(200, 'Admin user can administer Scald');
}