Add dossier workflow dates to the API
This commit is contained in:
parent
822c7cdd96
commit
bf67b3f7ad
3 changed files with 8 additions and 2 deletions
|
@ -5,7 +5,10 @@ class DossierSerializer < ActiveModel::Serializer
|
|||
:archived,
|
||||
:mandataire_social,
|
||||
:state,
|
||||
:simplified_state
|
||||
:simplified_state,
|
||||
:initiated_at,
|
||||
:received_at,
|
||||
:processed_at
|
||||
|
||||
has_one :entreprise
|
||||
has_one :etablissement
|
||||
|
|
|
@ -47,6 +47,9 @@
|
|||
"mandataire_social": false,
|
||||
"state": "updated",
|
||||
"simplified_state": "En construction",
|
||||
"initiated_at": "2017-04-11T12:00:12.000Z",
|
||||
"received_at": null,
|
||||
"processed_at": null,
|
||||
"entreprise": {
|
||||
"siren": "440117620",
|
||||
"capital_social": 537100000,
|
||||
|
|
|
@ -115,7 +115,7 @@ describe API::V1::DossiersController do
|
|||
let!(:dossier) { Timecop.freeze(date_creation) { create(:dossier, :with_entreprise, procedure: procedure) } }
|
||||
let(:dossier_id) { dossier.id }
|
||||
let(:body) { JSON.parse(retour.body, symbolize_names: true) }
|
||||
let(:field_list) { [:id, :created_at, :updated_at, :archived, :mandataire_social, :entreprise, :etablissement, :cerfa, :types_de_piece_justificative, :pieces_justificatives, :champs, :champs_private, :commentaires, :state, :simplified_state] }
|
||||
let(:field_list) { [:id, :created_at, :updated_at, :archived, :mandataire_social, :entreprise, :etablissement, :cerfa, :types_de_piece_justificative, :pieces_justificatives, :champs, :champs_private, :commentaires, :state, :simplified_state, :initiated_at, :processed_at, :received_at] }
|
||||
subject { body[:dossier] }
|
||||
|
||||
it 'return REST code 200', :show_in_doc do
|
||||
|
|
Loading…
Reference in a new issue