refactor(champs): validate only champs in current revision
This commit is contained in:
parent
8ccf2bed4c
commit
f7cd7e615d
14 changed files with 55 additions and 14 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue