Test for Custom Access Denied

grndlvl - October 2, 2008 - 11:32
Project:Drupal
Version:7.x-dev
Component:tests
Category:bug report
Priority:critical
Assigned:grndlvl
Status:closed
Description

This patch was originally inside of a really large patch, was suggested to split into smaller patches.

Tests needed: common.inc
http://drupal.org/node/276272

AttachmentSizeStatusTest resultOperations
custom_access_denied_test_1.patch1.82 KBIgnoredNoneNone

#1

grndlvl - October 2, 2008 - 11:38
Priority:normal» critical

Just getting same priority as parent task.

#2

Damien Tournoud - October 2, 2008 - 11:55
Status:needs review» needs work

I think we should refactor this one with PageNotFoundTestCase from system.test. After all, those are exactly the same, the only thing that change is the target path.

#3

grndlvl - October 8, 2008 - 02:19
Status:needs work» needs review

Per comment #2 suggestion this patch now applies this test to system.test rather than common.test.

AttachmentSizeStatusTest resultOperations
custom_access_denied_test_2.patch2.46 KBIgnoredNoneNone

#4

c960657 - October 8, 2008 - 19:20

Looks good. I tested the patch, and it works for me.

Two suggestions:

  • Also verify the HTTP response code using assertResponse().
  • Rename the test to "403/404 errors" (or "403/404 errors pages") for consistency with the text on admin/settings:
    Error reporting
    Control how Drupal deals with errors including 403/404 errors as well as PHP error reporting.

#5

grndlvl - October 9, 2008 - 12:08

made suggested changes from comment #4.

AttachmentSizeStatusTest resultOperations
custom_access_denied_test_3.patch3.9 KBIgnoredNoneNone

#6

swentel - October 10, 2008 - 14:58

What's the difference with http://drupal.org/node/296306 ?

#7

lilou - October 10, 2008 - 17:09

@swentel : I think test in #296306: TestingParty08: 403 page needs a test is also include in the last patch of this issue.

#8

grndlvl - October 13, 2008 - 02:05
Status:needs review» fixed

It seems that http://drupal.org/node/296306, contains all that this patch covered.

--project followup subject--

Anonymous (not verified) - October 27, 2008 - 02:13

Automatically closed -- issue fixed for two weeks with no activity.

#9

Anonymous (not verified) - October 27, 2008 - 02:37
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.