mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Disabled badly specified test
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@66397 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
2984355f43
commit
19a891984f
@ -12,12 +12,18 @@ class SiteTreePermissionsTest extends SapphireTest {
|
||||
function testRestrictedViewLoggedInUsers() {
|
||||
$page = $this->objFromFixture('Page', 'restrictedViewLoggedInUsers');
|
||||
|
||||
/*
|
||||
NOTE: This isn't correct. An "unauthed member" test needs to be done by setting the loggedInAs data in the session
|
||||
to zero and then confirming that a 403 response is returned. Alternatively, the canView() method needs a well-defined
|
||||
way of asking "can a person who isn't logged in view this?" perhaps by passing the integer value 0 to the canView() method
|
||||
as opposed to leaving it omitted, which uses Member::currentUser() as the default.
|
||||
$randomUnauthedMember = new Member();
|
||||
$randomUnauthedMember->ID = 99;
|
||||
$this->assertFalse(
|
||||
$page->canView($randomUnauthedMember),
|
||||
'Unauthenticated members cant view a page marked as "Viewable for any logged in users"'
|
||||
);
|
||||
*/
|
||||
|
||||
$websiteuser = $this->objFromFixture('Member', 'websiteuser');
|
||||
$websiteuser->logIn();
|
||||
|
Loading…
Reference in New Issue
Block a user