Add tests for FranceConnectInformationDecorator

This commit is contained in:
Xavier J 2016-12-15 15:38:32 +01:00
parent 73261a34c0
commit 5e950c1a5f

View file

@ -0,0 +1,17 @@
require 'spec_helper'
describe FranceConnectInformationDecorator do
let(:gender) { 'female' }
let(:france_connect_information) { create :france_connect_information, gender: gender }
subject { france_connect_information.decorate.gender_fr }
context 'when france connect user is a male' do
let(:gender) { 'male' }
it { is_expected.to eq 'Mr' }
end
context 'when france connect user is a female' do
it { is_expected.to eq 'Mme' }
end
end