aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/tests/js/shareSpec.js
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2016-03-21 11:15:00 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2016-03-21 11:15:00 +0100
commit8852fdaee3ee9b6bb52cbafcf358199321eb2307 (patch)
tree57816c31c2b480d42f04b05a2f49ff0dc391585d /apps/files_sharing/tests/js/shareSpec.js
parente983bd7db074878d2418bdfcc22daf4689d9ec54 (diff)
parent6e6e002280587dea3b8ba5ae55f0514295f29108 (diff)
downloadnextcloud-server-8852fdaee3ee9b6bb52cbafcf358199321eb2307.tar.gz
nextcloud-server-8852fdaee3ee9b6bb52cbafcf358199321eb2307.zip
Merge pull request #22789 from owncloud/dav-sharesproperty
Add webdav property for share info in PROPFIND response
Diffstat (limited to 'apps/files_sharing/tests/js/shareSpec.js')
-rw-r--r--apps/files_sharing/tests/js/shareSpec.js33
1 files changed, 12 insertions, 21 deletions
diff --git a/apps/files_sharing/tests/js/shareSpec.js b/apps/files_sharing/tests/js/shareSpec.js
index 7607ada50ba..c488bd94fab 100644
--- a/apps/files_sharing/tests/js/shareSpec.js
+++ b/apps/files_sharing/tests/js/shareSpec.js
@@ -53,35 +53,21 @@ describe('OCA.Sharing.Util tests', function() {
permissions: OC.PERMISSION_ALL,
etag: 'abc',
shareOwner: 'User One',
- isShareMountPoint: false
+ isShareMountPoint: false,
+ shareTypes: [OC.Share.SHARE_TYPE_USER]
}];
-
- OCA.Sharing.sharesLoaded = true;
- OC.Share.statuses = {
- 1: {link: false, path: '/subdir'}
- };
});
afterEach(function() {
delete OCA.Sharing.sharesLoaded;
delete OC.Share.droppedDown;
fileList.destroy();
fileList = null;
- OC.Share.statuses = {};
- OC.Share.currentShares = {};
});
describe('Sharing data in table row', function() {
// TODO: test data-permissions, data-share-owner, etc
});
describe('Share action icon', function() {
- beforeEach(function() {
- OC.Share.statuses = {1: {link: false, path: '/subdir'}};
- OCA.Sharing.sharesLoaded = true;
- });
- afterEach(function() {
- OC.Share.statuses = {};
- OCA.Sharing.sharesLoaded = false;
- });
it('do not shows share text when not shared', function() {
var $action, $tr;
OC.Share.statuses = {};
@@ -93,7 +79,8 @@ describe('OCA.Sharing.Util tests', function() {
mimetype: 'httpd/unix-directory',
size: 12,
permissions: OC.PERMISSION_ALL,
- etag: 'abc'
+ etag: 'abc',
+ shareTypes: []
}]);
$tr = fileList.$el.find('tbody tr:first');
$action = $tr.find('.action-share');
@@ -111,7 +98,8 @@ describe('OCA.Sharing.Util tests', function() {
mimetype: 'text/plain',
size: 12,
permissions: OC.PERMISSION_ALL,
- etag: 'abc'
+ etag: 'abc',
+ shareTypes: [OC.Share.SHARE_TYPE_USER]
}]);
$tr = fileList.$el.find('tbody tr:first');
$action = $tr.find('.action-share');
@@ -131,7 +119,8 @@ describe('OCA.Sharing.Util tests', function() {
mimetype: 'text/plain',
size: 12,
permissions: OC.PERMISSION_ALL,
- etag: 'abc'
+ etag: 'abc',
+ shareTypes: [OC.Share.SHARE_TYPE_LINK]
}]);
$tr = fileList.$el.find('tbody tr:first');
$action = $tr.find('.action-share');
@@ -151,7 +140,8 @@ describe('OCA.Sharing.Util tests', function() {
size: 12,
permissions: OC.PERMISSION_ALL,
shareOwner: 'User One',
- etag: 'abc'
+ etag: 'abc',
+ shareTypes: [OC.Share.SHARE_TYPE_USER]
}]);
$tr = fileList.$el.find('tbody tr:first');
$action = $tr.find('.action-share');
@@ -171,7 +161,8 @@ describe('OCA.Sharing.Util tests', function() {
size: 12,
permissions: OC.PERMISSION_ALL,
recipientsDisplayName: 'User One, User Two',
- etag: 'abc'
+ etag: 'abc',
+ shareTypes: [OC.Share.SHARE_TYPE_USER]
}]);
$tr = fileList.$el.find('tbody tr:first');
$action = $tr.find('.action-share');