You are here

function BlockAccessMoveTestCase::testOperationGranted in Block Access 7

Test $user1 can do operation

File

tests/op_basic_move.test, line 61
Tests for block_access / operation move

Class

BlockAccessMoveTestCase
Tests for block_access / operation move

Code

function testOperationGranted() {
  $this
    ->drupalLogin($this->user1);

  // Verify block in sidebar_first
  $this
    ->assertBlockInRegion($this->block, 'sidebar_first');

  // Move block to sidebar_second
  $edit = array(
    'blocks[block_' . $this->block->delta . '][region]' => 'sidebar_second',
  );
  $this
    ->drupalPost('admin/structure/block', $edit, t('Save blocks'));
  $this
    ->assertResponse(200);

  // Verify block in sidebar_second
  $this
    ->assertBlockInRegion($this->block, 'sidebar_second');
}