Fix multiple_drop_down_list mandatory check
This commit is contained in:
parent
806469d72e
commit
1449fbbe67
2 changed files with 8 additions and 0 deletions
|
@ -15,6 +15,12 @@ shared_examples 'champ_spec' do
|
|||
it { expect(champ.mandatory_and_blank?).to be(true) }
|
||||
end
|
||||
|
||||
context 'when multiple_drop_down_list mandatory and blank' do
|
||||
let(:type_de_champ) { build(:type_de_champ_multiple_drop_down_list, mandatory: mandatory) }
|
||||
let(:value) { '[]' }
|
||||
it { expect(champ.mandatory_and_blank?).to be(true) }
|
||||
end
|
||||
|
||||
context 'when not blank' do
|
||||
let(:value) { 'yop' }
|
||||
it { expect(champ.mandatory_and_blank?).to be(false) }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue