summaryrefslogtreecommitdiffstats
path: root/apps/comments/tests/js/commentstabviewSpec.js
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2016-02-04 11:26:11 +0100
committerVincent Petry <pvince81@owncloud.com>2016-02-04 11:26:11 +0100
commit2e46576e83ca4e30801060e0c23b1f587e6e318a (patch)
tree78f0ff86739fb3f56518183b6295449383d50683 /apps/comments/tests/js/commentstabviewSpec.js
parentb594aa18ee958c955f6f30bed3f446b2cd86cecd (diff)
downloadnextcloud-server-2e46576e83ca4e30801060e0c23b1f587e6e318a.tar.gz
nextcloud-server-2e46576e83ca4e30801060e0c23b1f587e6e318a.zip
Special label for deleted users in comments list
Diffstat (limited to 'apps/comments/tests/js/commentstabviewSpec.js')
-rw-r--r--apps/comments/tests/js/commentstabviewSpec.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/apps/comments/tests/js/commentstabviewSpec.js b/apps/comments/tests/js/commentstabviewSpec.js
index 4c3d38290ba..9e986899f7d 100644
--- a/apps/comments/tests/js/commentstabviewSpec.js
+++ b/apps/comments/tests/js/commentstabviewSpec.js
@@ -84,7 +84,6 @@ describe('OCA.Comments.CommentsTabView tests', function() {
});
it('renders comments', function() {
-
view.setFileInfo(fileInfoModel);
view.collection.set(testComments);
@@ -100,6 +99,15 @@ describe('OCA.Comments.CommentsTabView tests', function() {
expect($item.find('.date').text()).toEqual('5 minutes ago');
expect($item.find('.message').html()).toEqual('Second<br>Newline');
});
+
+ it('renders comments from deleted user differently', function() {
+ testComments[0].set('actorType', 'deleted_users', {silent: true});
+ view.collection.set(testComments);
+
+ var $item = view.$el.find('.comment[data-id=1]');
+ expect($item.find('.author').text()).toEqual('[Deleted user]');
+ expect($item.find('.avatar').attr('data-username')).not.toBeDefined();
+ });
});
describe('more comments', function() {
var hasMoreResultsStub;