diff options
Diffstat (limited to 'tests/integration')
-rw-r--r-- | tests/integration/environment/EnvironmentSetupTest.php (renamed from tests/integration/environment/EnvironmentTest.php) | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/tests/integration/environment/EnvironmentTest.php b/tests/integration/environment/EnvironmentSetupTest.php index b50f8945..0060f132 100644 --- a/tests/integration/environment/EnvironmentTest.php +++ b/tests/integration/environment/EnvironmentSetupTest.php @@ -18,11 +18,11 @@ use OCP\Files\Node; use OCA\Gallery\Tests\Integration\GalleryIntegrationTest; /** - * Class EnvironmentTest + * Class EnvironmentSetupTest * * @package OCA\Gallery\Tests\Integration */ -class EnvironmentTest extends GalleryIntegrationTest { +class EnvironmentSetupTest extends GalleryIntegrationTest { /** * Tests is setting up the environment using a normal user works @@ -65,15 +65,24 @@ class EnvironmentTest extends GalleryIntegrationTest { $this->assertEquals($sharedFolderId, $result->getId()); } + public function testGetSharedNodeAsATokenUserWhenGivenFileToken() { + $environment = $this->setTokenBasedEnv($this->sharedFileToken); + + $sharedFileId = $this->sharedFile->getId(); + $result = $environment->getSharedNode(); + + $this->assertEquals($sharedFileId, $result->getId()); + } + /** - * We can't get the folder if we're given a file token + * We can't get the virtual root if we're given a file token * - * @expects EnvironmentException + * @expectedException \OCA\Gallery\Environment\NotFoundEnvException */ - public function testGetSharedNodeAsATokenUserWhenGivenFileToken() { + public function testGetVirtualRootFolderAsATokenUserWhenGivenFileToken() { $environment = $this->setTokenBasedEnv($this->sharedFileToken); - $environment->getSharedNode(); + $environment->getVirtualRootFolder(); } public function testGetVirtualRootFolderAsALoggedInUser() { |