allow having duration in payload representer

It will only show up if the feature flag is enabled. As this will not yet be used in production it is ok to behave like that.
pull/10799/head
ulferts 2 years ago
parent c33890eb2c
commit 44996d2ec3
No known key found for this signature in database
GPG Key ID: A205708DE1284017
  1. 26
      spec/lib/api/v3/work_packages/work_package_payload_representer_spec.rb

@ -269,32 +269,6 @@ describe ::API::V3::WorkPackages::WorkPackagePayloadRepresenter do
end
end
end
describe 'duration' do
before do
allow(OpenProject::FeatureDecisions)
.to receive(:work_packages_duration_field_active?)
.and_return(true)
end
it 'has no duration attribute' do
# TODO: Remove this, once the duration feature is complete
expect(subject).not_to have_json_path('duration')
end
context 'when duration feature flag disabled' do
before do
allow(OpenProject::FeatureDecisions)
.to receive(:work_packages_duration_field_active?)
.and_return(false)
end
it 'has no duration attribute' do
# TODO: Remove this, once the duration feature is complete
expect(subject).not_to have_json_path('duration')
end
end
end
end
describe '_links' do

Loading…
Cancel
Save