diff options
Diffstat (limited to 'apps/comments/tests/js/filespluginSpec.js')
-rw-r--r-- | apps/comments/tests/js/filespluginSpec.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/apps/comments/tests/js/filespluginSpec.js b/apps/comments/tests/js/filespluginSpec.js index 06131698032..e2d97da5f96 100644 --- a/apps/comments/tests/js/filespluginSpec.js +++ b/apps/comments/tests/js/filespluginSpec.js @@ -65,16 +65,18 @@ describe('OCA.Comments.FilesPlugin tests', function() { expect($tr.attr('data-comments-unread')).toEqual('3'); }); it('clicking icon opens sidebar', function() { - var sidebarStub = sinon.stub(fileList, 'showDetailsView'); + var sidebarTabStub = sinon.stub(OCA.Files.Sidebar, 'setActiveTab'); + var sidebarStub = sinon.stub(OCA.Files.Sidebar, 'open'); var $action, $tr; fileList.setFiles(testFiles); $tr = fileList.findFileEl('One.txt'); $action = $tr.find('.action-comment'); $action.click(); + expect(sidebarTabStub.calledOnce).toEqual(true); + expect(sidebarTabStub.lastCall.args[0]).toEqual('comments'); expect(sidebarStub.calledOnce).toEqual(true); - expect(sidebarStub.lastCall.args[0]).toEqual('One.txt'); - expect(sidebarStub.lastCall.args[1]).toEqual('comments'); + expect(sidebarStub.lastCall.args[0]).toEqual('/One.txt'); }); }); describe('elementToFile', function() { |