diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-20 12:55:51 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-20 12:55:51 +0300 |
commit | e8d2c2579383897a1dd7f9debd359abe8ae8373d (patch) | |
tree | c42be41678c2586d49a75cabce89322082698334 /spec/controllers/projects/merge_requests/diffs_controller_spec.rb | |
parent | fc845b37ec3a90aaa719975f607740c22ba6a113 (diff) |
Add latest changes from gitlab-org/gitlab@14-1-stable-eev14.1.0-rc42
Diffstat (limited to 'spec/controllers/projects/merge_requests/diffs_controller_spec.rb')
-rw-r--r-- | spec/controllers/projects/merge_requests/diffs_controller_spec.rb | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/spec/controllers/projects/merge_requests/diffs_controller_spec.rb b/spec/controllers/projects/merge_requests/diffs_controller_spec.rb index 4fcb63ac616..707d074b5c1 100644 --- a/spec/controllers/projects/merge_requests/diffs_controller_spec.rb +++ b/spec/controllers/projects/merge_requests/diffs_controller_spec.rb @@ -88,8 +88,6 @@ RSpec.describe Projects::MergeRequests::DiffsController do let(:merge_request) { create(:merge_request_with_diffs, target_project: project, source_project: project) } before do - stub_feature_flags(diffs_gradual_load: false) - project.add_maintainer(user) sign_in(user) end @@ -474,8 +472,6 @@ RSpec.describe Projects::MergeRequests::DiffsController do diff_view: :inline, merge_ref_head_diff: nil, pagination_data: { - current_page: nil, - next_page: nil, total_pages: nil }.merge(pagination_data) } @@ -486,7 +482,7 @@ RSpec.describe Projects::MergeRequests::DiffsController do namespace_id: project.namespace.to_param, project_id: project, id: merge_request.iid, - page: 1, + page: 0, per_page: 20, format: 'json' } @@ -517,7 +513,7 @@ RSpec.describe Projects::MergeRequests::DiffsController do it_behaves_like 'serializes diffs with expected arguments' do let(:collection) { Gitlab::Diff::FileCollection::MergeRequestDiffBatch } - let(:expected_options) { collection_arguments(current_page: 1, total_pages: 1).merge(merge_ref_head_diff: false) } + let(:expected_options) { collection_arguments(total_pages: 20).merge(merge_ref_head_diff: false) } end it_behaves_like 'successful request' @@ -557,7 +553,7 @@ RSpec.describe Projects::MergeRequests::DiffsController do it_behaves_like 'serializes diffs with expected arguments' do let(:collection) { Gitlab::Diff::FileCollection::MergeRequestDiffBatch } let(:expected_options) do - collection_arguments(current_page: 1, total_pages: 1) + collection_arguments(total_pages: 20) end end @@ -576,18 +572,18 @@ RSpec.describe Projects::MergeRequests::DiffsController do it_behaves_like 'serializes diffs with expected arguments' do let(:collection) { Gitlab::Diff::FileCollection::MergeRequestDiffBatch } - let(:expected_options) { collection_arguments(current_page: 1, total_pages: 1) } + let(:expected_options) { collection_arguments(total_pages: 20) } end it_behaves_like 'successful request' end context 'with smaller diff batch params' do - subject { go(page: 2, per_page: 5) } + subject { go(page: 5, per_page: 5) } it_behaves_like 'serializes diffs with expected arguments' do let(:collection) { Gitlab::Diff::FileCollection::MergeRequestDiffBatch } - let(:expected_options) { collection_arguments(current_page: 2, next_page: 3, total_pages: 4) } + let(:expected_options) { collection_arguments(total_pages: 20) } end it_behaves_like 'successful request' |