include dates in schema

pull/2461/head
Jan Sandbrink 10 years ago
parent ed2d79e4e1
commit b50bad4716
  1. 6
      lib/api/v3/work_packages/form/work_package_schema_representer.rb
  2. 12
      spec/lib/api/v3/work_packages/form/work_package_schema_representer_spec.rb

@ -47,6 +47,12 @@ module API
property :description,
getter: -> (*) { { type: 'Formattable' } },
writeable: false
property :startDate,
getter: -> (*) { { type: 'Date' } },
writeable: false
property :dueDate,
getter: -> (*) { { type: 'Date' } },
writeable: false
property :status,
exec_context: :decorator,
getter: -> (*) {

@ -93,6 +93,18 @@ describe ::API::V3::WorkPackages::Form::WorkPackageSchemaRepresenter do
it_behaves_like 'schema property', 'subject', 'String'
end
describe 'description' do
it_behaves_like 'schema property', 'description', 'Formattable'
end
describe 'startDate' do
it_behaves_like 'schema property', 'startDate', 'Date'
end
describe 'dueDate' do
it_behaves_like 'schema property', 'dueDate', 'Date'
end
describe 'status' do
shared_examples_for 'contains statuses' do
it_behaves_like 'linked property', 'status', 'Status'

Loading…
Cancel
Save