summaryrefslogtreecommitdiff
path: root/spec/helpers/commits_helper_spec.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-04-11 15:09:47 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-04-11 15:09:47 +0000
commit9b8aeacf0e67e8dfc1a1c618868c3fea9e37740f (patch)
tree94cfe5a48b9c1ea8f6746065a3b3c553793ccfc3 /spec/helpers/commits_helper_spec.rb
parent557082a258131a5397821658b7552e7a8b7bbf93 (diff)
downloadgitlab-ce-9b8aeacf0e67e8dfc1a1c618868c3fea9e37740f.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/helpers/commits_helper_spec.rb')
-rw-r--r--spec/helpers/commits_helper_spec.rb10
1 files changed, 2 insertions, 8 deletions
diff --git a/spec/helpers/commits_helper_spec.rb b/spec/helpers/commits_helper_spec.rb
index 98db185c180..961e7688202 100644
--- a/spec/helpers/commits_helper_spec.rb
+++ b/spec/helpers/commits_helper_spec.rb
@@ -163,13 +163,7 @@ RSpec.describe CommitsHelper do
end
end
- let(:params) do
- {
- page: page
- }
- end
-
- subject { helper.conditionally_paginate_diff_files(diffs_collection, paginate: paginate, per: Projects::CommitController::COMMIT_DIFFS_PER_PAGE) }
+ subject { helper.conditionally_paginate_diff_files(diffs_collection, paginate: paginate, page: page, per: Projects::CommitController::COMMIT_DIFFS_PER_PAGE) }
before do
allow(helper).to receive(:params).and_return(params)
@@ -183,7 +177,7 @@ RSpec.describe CommitsHelper do
end
it "can change the number of items per page" do
- commits = helper.conditionally_paginate_diff_files(diffs_collection, paginate: paginate, per: 10)
+ commits = helper.conditionally_paginate_diff_files(diffs_collection, page: page, paginate: paginate, per: 10)
expect(commits).to be_an(Array)
expect(commits.size).to eq(10)