You are here

public function ChecklistapiWebTestCase::testAccessReport in Checklist API 7

Test report access.

File

tests/checklistapi.test, line 116
Tests for Checklist API module.

Class

ChecklistapiWebTestCase
Functional tests for Checklist API.

Code

public function testAccessReport() {
  $report_path = 'admin/reports/checklistapi';
  $this
    ->drupalGet($report_path);
  $this
    ->assertResponse(200, 'Granted access to user with "view checklistapi checklists report" permission.');
  $this
    ->drupalLogout();
  $this
    ->drupalGet($report_path);
  $this
    ->assertResponse(403, 'Denied access to nonprivileged user.');
}