fix(champ): no validate on hidden champs

This commit is contained in:
Paul Chavard 2024-04-05 10:34:01 +02:00
parent 63052ea063
commit 80b3f0c0b3
6 changed files with 36 additions and 11 deletions

View file

@ -1,11 +1,11 @@
describe Champs::CheckboxChamp do
it_behaves_like "a boolean champ" do
let(:boolean_champ) { Champs::CheckboxChamp.new(value: value) }
let(:boolean_champ) { build(:champ_checkbox, value: value) }
end
# TODO remove when normalize_checkbox_values is over
describe '#true?' do
let(:checkbox_champ) { Champs::CheckboxChamp.new(value: value) }
let(:checkbox_champ) { build(:champ_checkbox, value: value) }
subject { checkbox_champ.true? }
context "when the checkbox value is 'on'" do