diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2013-08-01 14:19:33 +0200 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2013-08-01 14:19:33 +0200 |
commit | 69173c2a6bad0646efcebe9815fbd18c57665ebd (patch) | |
tree | 9df9503e9867c75fcc01553f28a9f70b59339392 /apps/files_encryption/tests | |
parent | 9253627327a35c9446f413bc487c2d7b0f63f9af (diff) | |
download | nextcloud-server-69173c2a6bad0646efcebe9815fbd18c57665ebd.tar.gz nextcloud-server-69173c2a6bad0646efcebe9815fbd18c57665ebd.zip |
fix test and make warning translatable
Diffstat (limited to 'apps/files_encryption/tests')
-rwxr-xr-x | apps/files_encryption/tests/share.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/apps/files_encryption/tests/share.php b/apps/files_encryption/tests/share.php index ebf678da78e..5f3d5005090 100755 --- a/apps/files_encryption/tests/share.php +++ b/apps/files_encryption/tests/share.php @@ -881,8 +881,13 @@ class Test_Encryption_Share extends \PHPUnit_Framework_TestCase { \OC_FileProxy::$enabled = $proxyStatus; // share the file - \OCP\Share::shareItem('file', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_GROUP, \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_GROUP1, OCP\PERMISSION_ALL); - + try { + \OCP\Share::shareItem('file', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_GROUP, \Test_Encryption_Share::TEST_ENCRYPTION_SHARE_GROUP1, OCP\PERMISSION_ALL); + } catch (Exception $e) { + $this->assertEquals(0, strpos($e->getMessage(), "Following users are not set up for encryption")); + } + + // login as admin \Test_Encryption_Util::loginHelper(\Test_Encryption_Share::TEST_ENCRYPTION_SHARE_USER1); |