Merge branch 'develop' into staging

This commit is contained in:
Xavier J 2016-07-11 14:43:29 +02:00
commit b4f02327f6
2 changed files with 4 additions and 2 deletions

View file

@ -4,7 +4,8 @@ class DossierSerializer < ActiveModel::Serializer
:created_at, :created_at,
:updated_at, :updated_at,
:archived, :archived,
:mandataire_social :mandataire_social,
:state
has_one :entreprise has_one :entreprise
has_one :etablissement has_one :etablissement

View file

@ -116,7 +116,7 @@ describe API::V1::DossiersController do
let!(:dossier) { Timecop.freeze(date_creation) { create(:dossier, :with_entreprise, procedure: procedure) } } let!(:dossier) { Timecop.freeze(date_creation) { create(:dossier, :with_entreprise, procedure: procedure) } }
let(:dossier_id) { dossier.id } let(:dossier_id) { dossier.id }
let(:body) { JSON.parse(retour.body, symbolize_names: true) } let(:body) { JSON.parse(retour.body, symbolize_names: true) }
let(:field_list) { [:id, :nom_projet, :created_at, :updated_at, :archived, :mandataire_social, :entreprise, :etablissement, :cerfa, :types_de_piece_justificative, :pieces_justificatives, :champs, :commentaires] } let(:field_list) { [:id, :nom_projet, :created_at, :updated_at, :archived, :mandataire_social, :entreprise, :etablissement, :cerfa, :types_de_piece_justificative, :pieces_justificatives, :champs, :commentaires, :state] }
subject { body[:dossier] } subject { body[:dossier] }
it 'return REST code 200', :show_in_doc do it 'return REST code 200', :show_in_doc do
@ -124,6 +124,7 @@ describe API::V1::DossiersController do
end end
it { expect(subject[:id]).to eq(dossier.id) } it { expect(subject[:id]).to eq(dossier.id) }
it { expect(subject[:nom_projet]).to eq(dossier.nom_projet) } it { expect(subject[:nom_projet]).to eq(dossier.nom_projet) }
it { expect(subject[:state]).to eq(dossier.state) }
it { expect(subject[:created_at]).to eq('2008-09-01T08:05:00.000Z') } it { expect(subject[:created_at]).to eq('2008-09-01T08:05:00.000Z') }
it { expect(subject[:updated_at]).to eq('2008-09-01T08:05:00.000Z') } it { expect(subject[:updated_at]).to eq('2008-09-01T08:05:00.000Z') }
it { expect(subject[:archived]).to eq(dossier.archived) } it { expect(subject[:archived]).to eq(dossier.archived) }