refactor(champs): validate only champs in current revision

This commit is contained in:
Paul Chavard 2024-08-22 17:33:32 +02:00
parent 8ccf2bed4c
commit f7cd7e615d
No known key found for this signature in database
14 changed files with 55 additions and 14 deletions

View file

@ -2,7 +2,10 @@
describe Champs::RNAChamp do
let(:champ) { Champs::RNAChamp.new(value: "W182736273", dossier: build(:dossier)) }
before { allow(champ).to receive(:type_de_champ).and_return(build(:type_de_champ_rna)) }
before do
allow(champ).to receive(:type_de_champ).and_return(build(:type_de_champ_rna))
allow(champ).to receive(:in_dossier_revision?).and_return(true)
end
def with_value(value)
champ.tap { _1.value = value }
end