diff options
Diffstat (limited to 'modules/book/book.test')
-rw-r--r-- | modules/book/book.test | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/book/book.test b/modules/book/book.test index d1f527387..2708e3674 100644 --- a/modules/book/book.test +++ b/modules/book/book.test @@ -258,6 +258,13 @@ class BookTestCase extends DrupalWebTestCase { // Try getting the URL directly, and verify it fails. $this->drupalGet('book/export/html/' . $this->book->nid); $this->assertResponse('403', t('Anonymous user properly forbidden.')); + + // Now grant anonymous users permission to view the printer-friendly + // version and verify that node access restrictions still prevent them from + // seeing it. + user_role_grant_permissions(DRUPAL_ANONYMOUS_RID, array('access printer-friendly version')); + $this->drupalGet('book/export/html/' . $this->book->nid); + $this->assertResponse('403', 'Anonymous user properly forbidden from seeing the printer-friendly version when denied by node access.'); } /** |