summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2015-08-26 11:39:22 +0200
committerMorris Jobke <hey@morrisjobke.de>2015-08-26 11:39:22 +0200
commit202af1e3229278abde5dd4597917ff3c390d5f6f (patch)
treeb7dd337d7852715691aa1be079d9847f0d8e69ac /apps
parentc11ea056d06be7859071eb3176462a9d4d56964e (diff)
downloadnextcloud-server-202af1e3229278abde5dd4597917ff3c390d5f6f.tar.gz
nextcloud-server-202af1e3229278abde5dd4597917ff3c390d5f6f.zip
fix unit tests
Diffstat (limited to 'apps')
-rw-r--r--apps/files_sharing/tests/js/shareSpec.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/apps/files_sharing/tests/js/shareSpec.js b/apps/files_sharing/tests/js/shareSpec.js
index 581e15caf93..b6368b901ee 100644
--- a/apps/files_sharing/tests/js/shareSpec.js
+++ b/apps/files_sharing/tests/js/shareSpec.js
@@ -117,7 +117,7 @@ describe('OCA.Sharing.Util tests', function() {
$tr = fileList.$el.find('tbody tr:first');
$action = $tr.find('.action-share');
expect($action.hasClass('permanent')).toEqual(true);
- expect($action.find('>span').text()).toEqual('Shared');
+ expect($action.find('>span').text().trim()).toEqual('Shared');
expect(OC.basename($action.find('img').attr('src'))).toEqual('share.svg');
expect(OC.basename(getImageUrl($tr.find('.filename .thumbnail')))).toEqual('folder-shared.svg');
expect($action.find('img').length).toEqual(1);
@@ -138,7 +138,7 @@ describe('OCA.Sharing.Util tests', function() {
$tr = fileList.$el.find('tbody tr:first');
$action = $tr.find('.action-share');
expect($action.hasClass('permanent')).toEqual(true);
- expect($action.find('>span').text()).toEqual('Shared');
+ expect($action.find('>span').text().trim()).toEqual('Shared');
expect(OC.basename($action.find('img').attr('src'))).toEqual('public.svg');
expect(OC.basename(getImageUrl($tr.find('.filename .thumbnail')))).toEqual('folder-public.svg');
expect($action.find('img').length).toEqual(1);
@@ -159,7 +159,7 @@ describe('OCA.Sharing.Util tests', function() {
$tr = fileList.$el.find('tbody tr:first');
$action = $tr.find('.action-share');
expect($action.hasClass('permanent')).toEqual(true);
- expect($action.find('>span').text()).toEqual('User One');
+ expect($action.find('>span').text().trim()).toEqual('User One');
expect(OC.basename($action.find('img').attr('src'))).toEqual('share.svg');
expect(OC.basename(getImageUrl($tr.find('.filename .thumbnail')))).toEqual('folder-shared.svg');
});
@@ -179,7 +179,7 @@ describe('OCA.Sharing.Util tests', function() {
$tr = fileList.$el.find('tbody tr:first');
$action = $tr.find('.action-share');
expect($action.hasClass('permanent')).toEqual(true);
- expect($action.find('>span').text()).toEqual('Shared with User One, User Two');
+ expect($action.find('>span').text().trim()).toEqual('Shared with User One, User Two');
expect(OC.basename($action.find('img').attr('src'))).toEqual('share.svg');
expect(OC.basename(getImageUrl($tr.find('.filename .thumbnail')))).toEqual('folder-shared.svg');
expect($action.find('img').length).toEqual(1);
@@ -275,7 +275,7 @@ describe('OCA.Sharing.Util tests', function() {
OC.Share.updateIcon('file', 1);
expect($action.hasClass('permanent')).toEqual(true);
- expect($action.find('>span').text()).toEqual('Shared with Group One, Group Two, User One, User Two');
+ expect($action.find('>span').text().trim()).toEqual('Shared with Group One, Group Two, User One, User Two');
expect(OC.basename($action.find('img').attr('src'))).toEqual('share.svg');
});
it('updates share icon after updating shares of a file', function() {
@@ -311,7 +311,7 @@ describe('OCA.Sharing.Util tests', function() {
OC.Share.updateIcon('file', 1);
expect($action.hasClass('permanent')).toEqual(true);
- expect($action.find('>span').text()).toEqual('Shared with User One, User Three, User Two');
+ expect($action.find('>span').text().trim()).toEqual('Shared with User One, User Three, User Two');
expect(OC.basename($action.find('img').attr('src'))).toEqual('share.svg');
});
it('removes share icon after removing all shares from a file', function() {
@@ -380,7 +380,7 @@ describe('OCA.Sharing.Util tests', function() {
OC.Share.updateIcon('file', 1);
expect($action.hasClass('permanent')).toEqual(true);
- expect($action.find('>span').text()).toEqual('User One');
+ expect($action.find('>span').text().trim()).toEqual('User One');
expect(OC.basename($action.find('img').attr('src'))).toEqual('share.svg');
});
it('keep share text after unsharing reshare', function() {
@@ -416,7 +416,7 @@ describe('OCA.Sharing.Util tests', function() {
OC.Share.updateIcon('file', 1);
expect($action.hasClass('permanent')).toEqual(true);
- expect($action.find('>span').text()).toEqual('User One');
+ expect($action.find('>span').text().trim()).toEqual('User One');
expect(OC.basename($action.find('img').attr('src'))).toEqual('share.svg');
});
});