You are here

function JammerPreviewButtonTest::testNoPreviewButtonNoContentAccess in Jammer 5

File

tests/jammer_preview.test, line 12

Class

JammerPreviewButtonTest

Code

function testNoPreviewButtonNoContentAccess() {
  $user = $this
    ->drupalCreateUserRolePerm(array(
    'access content',
  ));
  $this
    ->drupalLoginUser($user);
  $this
    ->drupalModuleEnable('jammer');
  $this
    ->drupalVariableSet('jammer_preview_button_unset_node_types', array(
    'page',
  ));
  $url = url('node/add/page', NULL, NULL, TRUE);
  $this
    ->get($url);
  $this
    ->assertNoUnwantedRaw('id="edit-preview"');
}