]> source.dussan.org Git - nextcloud-server.git/commitdiff
Stub for pageSize, because now it is dynamically calculated
authorNazar Mokrynskyi <nazar@mokrynskyi.com>
Wed, 15 Oct 2014 13:09:01 +0000 (15:09 +0200)
committerNazar Mokrynskyi <nazar@mokrynskyi.com>
Wed, 15 Oct 2014 13:09:01 +0000 (15:09 +0200)
apps/files/tests/js/filelistSpec.js

index 94b52b395e56e116f30ce137186308fa57f9bbc9..e3cff352803a47ba8d3d42262614ce2d8348d831 100644 (file)
@@ -20,7 +20,7 @@
 */
 
 describe('OCA.Files.FileList tests', function() {
-       var testFiles, alertStub, notificationStub, fileList;
+       var testFiles, alertStub, notificationStub, fileList, pageSizeStub;
        var bcResizeStub;
 
        /**
@@ -120,7 +120,7 @@ describe('OCA.Files.FileList tests', function() {
                        size: 250,
                        etag: '456'
                }];
-
+               pageSizeStub = sinon.stub(OCA.File.FileList.prototype, 'pageSize').returns(20);
                fileList = new OCA.Files.FileList($('#app-content-files'));
        });
        afterEach(function() {
@@ -130,6 +130,7 @@ describe('OCA.Files.FileList tests', function() {
                notificationStub.restore();
                alertStub.restore();
                bcResizeStub.restore();
+               pageSizeStub.restore();
        });
        describe('Getters', function() {
                it('Returns the current directory', function() {