Commit b3de3d72 authored by Vincent Petry's avatar Vincent Petry
Browse files

Fix breadcrumb click JS unit test

parent 2b8ef3ac
......@@ -1309,7 +1309,7 @@ describe('OCA.Files.FileList tests', function() {
fileList.changeDirectory('/subdir/two/three with space/four/five');
fakeServer.respond();
var changeDirStub = sinon.stub(fileList, 'changeDirectory');
fileList.breadcrumb.$el.find('.crumb:eq(0)').click();
fileList.breadcrumb.$el.find('.crumb:eq(0)').trigger({type: 'click', which: 1});
expect(changeDirStub.calledOnce).toEqual(true);
expect(changeDirStub.getCall(0).args[0]).toEqual('/');
......@@ -1319,7 +1319,7 @@ describe('OCA.Files.FileList tests', function() {
fileList.changeDirectory('/subdir/two/three with space/four/five');
fakeServer.respond();
var changeDirStub = sinon.stub(fileList, 'changeDirectory');
fileList.breadcrumb.$el.find('.crumb:eq(3)').click();
fileList.breadcrumb.$el.find('.crumb:eq(3)').trigger({type: 'click', which: 1});
expect(changeDirStub.calledOnce).toEqual(true);
expect(changeDirStub.getCall(0).args[0]).toEqual('/subdir/two/three with space');
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment