You are here

jammer_settings.test in Jammer 5

File

tests/jammer_settings.test
View source
<?php

class JammerSettingsTest extends DrupalTestCase {
  function get_info() {
    return array(
      'name' => 'Jammer Settings Page Test',
      'desc' => "This tests the Jammer settings page loads for correctness.",
      'group' => 'Jammer',
    );
  }
  function testSettingsExists() {
    $user = $this
      ->drupalCreateUserRolePerm(array(
      'administer site configuration',
    ));
    $this
      ->drupalLoginUser($user);
    $this
      ->drupalModuleEnable('jammer');
    $url = url('admin/settings/jammer', NULL, NULL, TRUE);
    $this
      ->get($url);
    $this
      ->assertText('Jammer');
  }
  function testSettingsSecured() {
    $user = $this
      ->drupalCreateUserRolePerm(array(
      'access content',
    ));
    $this
      ->drupalLoginUser($user);
    $this
      ->drupalModuleEnable('jammer');
    $url = url('admin/settings/jammer', NULL, NULL, TRUE);
    $this
      ->get($url);
    $this
      ->assertNoText('Jammer');
  }

}

Classes

Namesort descending Description
JammerSettingsTest