Add tests for FranceConnectInformationDecorator
This commit is contained in:
parent
73261a34c0
commit
5e950c1a5f
1 changed files with 17 additions and 0 deletions
17
spec/decorators/france_connect_inforation_decorator_spec.rb
Normal file
17
spec/decorators/france_connect_inforation_decorator_spec.rb
Normal 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
|
Loading…
Add table
Reference in a new issue