Merge branch 'develop' into staging

This commit is contained in:
Mathieu Magnin 2017-03-27 16:27:41 +02:00
commit d2b293b4b8
5 changed files with 6 additions and 6 deletions

View file

@ -2,6 +2,6 @@ class FranceConnectInformationDecorator < Draper::Decorator
delegate_all
def gender_fr
gender == 'female' ? 'Mme' : 'Mr'
gender == 'female' ? 'Mme' : 'M.'
end
end

View file

@ -2,7 +2,7 @@ class UserDecorator < Draper::Decorator
delegate_all
def gender_fr
return 'Mr' if gender == 'male'
return 'M.' if gender == 'male'
return 'Mme' if gender == 'female'
end

View file

@ -16,7 +16,7 @@
%label
%h4
Civilité
= ff.select :gender, ['Mr', 'Mme']
= ff.select :gender, ['M.', 'Mme']
.form-group
%label
%h4

View file

@ -364,14 +364,14 @@ describe Users::DossiersController, type: :controller do
context 'when procedure is for individual' do
let(:params) { {id: dossier_id, dossier: {id: dossier_id, autorisation_donnees: '1', individual_attributes: individual_params}} }
let(:individual_params) { {gender: 'Mr', nom: 'Julien', prenom: 'Xavier', birthdate: '20/01/1991'} }
let(:individual_params) { {gender: 'M.', nom: 'Julien', prenom: 'Xavier', birthdate: '20/01/1991'} }
let(:procedure) { create(:procedure, :published, for_individual: true) }
before do
dossier.reload
end
it { expect(dossier.individual.gender).to eq 'Mr' }
it { expect(dossier.individual.gender).to eq 'M.' }
it { expect(dossier.individual.nom).to eq 'Julien' }
it { expect(dossier.individual.prenom).to eq 'Xavier' }
it { expect(dossier.individual.birthdate).to eq '20/01/1991' }

View file

@ -8,7 +8,7 @@ describe FranceConnectInformationDecorator do
context 'when france connect user is a male' do
let(:gender) { 'male' }
it { is_expected.to eq 'Mr' }
it { is_expected.to eq 'M.' }
end
context 'when france connect user is a female' do