Commit 8c0cb936 authored by Igor Drozdov's avatar Igor Drozdov

Remove merge_request_short_pipeline_serializer FF

parent 334e139d
......@@ -20,19 +20,11 @@ class MergeRequestPollWidgetEntity < Grape::Entity
expose :merge_user, using: UserEntity
expose :actual_head_pipeline, as: :pipeline, if: -> (mr, _) { presenter(mr).can_read_pipeline? } do |merge_request, options|
if Feature.enabled?(:merge_request_short_pipeline_serializer, merge_request.project, default_enabled: true)
MergeRequests::PipelineEntity.represent(merge_request.actual_head_pipeline, options)
else
PipelineDetailsEntity.represent(merge_request.actual_head_pipeline, options)
end
MergeRequests::PipelineEntity.represent(merge_request.actual_head_pipeline, options)
end
expose :merge_pipeline, if: ->(mr, _) { mr.merged? && can?(request.current_user, :read_pipeline, mr.target_project)} do |merge_request, options|
if Feature.enabled?(:merge_request_short_pipeline_serializer, merge_request.project, default_enabled: true)
MergeRequests::PipelineEntity.represent(merge_request.merge_pipeline, options)
else
PipelineDetailsEntity.represent(merge_request.merge_pipeline, options)
end
MergeRequests::PipelineEntity.represent(merge_request.merge_pipeline, options)
end
expose :default_merge_commit_message
......
---
name: merge_request_short_pipeline_serializer
introduced_by_url:
rollout_issue_url:
group:
type: development
default_enabled: true
......@@ -44,20 +44,6 @@ RSpec.describe MergeRequestPollWidgetEntity do
expect(subject[:merge_pipeline]).to eq(pipeline_payload)
end
context 'when merge_request_short_pipeline_serializer is disabled' do
it 'returns detailed info about pipeline' do
stub_feature_flags(merge_request_short_pipeline_serializer: false)
pipeline.reload
pipeline_payload =
PipelineDetailsEntity
.represent(pipeline, request: request)
.as_json
expect(subject[:merge_pipeline]).to eq(pipeline_payload)
end
end
context 'when user cannot read pipelines on target project' do
before do
project.add_guest(user)
......@@ -245,19 +231,6 @@ RSpec.describe MergeRequestPollWidgetEntity do
expect(subject[:pipeline]).to eq(pipeline_payload)
end
context 'when merge_request_short_pipeline_serializer is disabled' do
it 'returns detailed info about pipeline' do
stub_feature_flags(merge_request_short_pipeline_serializer: false)
pipeline_payload =
PipelineDetailsEntity
.represent(pipeline, request: req)
.as_json
expect(subject[:pipeline]).to eq(pipeline_payload)
end
end
it 'returns ci_status' do
expect(subject[:ci_status]).to eq('pending')
end
......
Markdown is supported
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