mirror of
https://github.com/silverstripe/silverstripe-dms
synced 2024-10-22 14:05:56 +02:00
BUGFIX: fixing unit tests to account for the ability for Admins to download embargoed files
This commit is contained in:
parent
1bd5d929ef
commit
841afad0da
@ -41,8 +41,13 @@ class DMSEmbargoTest extends SapphireTest {
|
||||
|
||||
$doc->embargoIndefinitely();
|
||||
|
||||
$this->logInWithPermission('ADMIN');
|
||||
$result = $controller->index($this->createFakeHTTPRequest($docID));
|
||||
$this->assertNotEquals($doc->getFullPath(),$result,"File no longer returned (in test mode)");
|
||||
$this->assertEquals($doc->getFullPath(),$result,"Admins can still download embargoed files");
|
||||
|
||||
$this->logInWithPermission('random-user-group');
|
||||
$result = $controller->index($this->createFakeHTTPRequest($docID));
|
||||
$this->assertNotEquals($doc->getFullPath(),$result,"File no longer returned (in test mode) when switching to other user group");
|
||||
|
||||
DMS::$dmsFolder = $oldDMSFolder;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user