Better labels in test
This commit is contained in:
parent
179bb5a9fe
commit
21ee79669d
1 changed files with 4 additions and 4 deletions
|
@ -392,17 +392,17 @@ describe TagsSubstitutionConcern, type: :model do
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'when procedure has revisions' do
|
context 'when procedure has revisions' do
|
||||||
let(:types_de_champ) { [build(:type_de_champ, libelle: 'mon tag')] }
|
let(:types_de_champ) { [build(:type_de_champ, libelle: 'mon ancien libellé')] }
|
||||||
let(:draft_type_de_champ) { procedure.draft_revision.find_or_clone_type_de_champ(types_de_champ[0].stable_id) }
|
let(:draft_type_de_champ) { procedure.draft_revision.find_or_clone_type_de_champ(types_de_champ[0].stable_id) }
|
||||||
|
|
||||||
before do
|
before do
|
||||||
draft_type_de_champ.update(libelle: 'ton tag')
|
draft_type_de_champ.update(libelle: 'mon nouveau libellé')
|
||||||
dossier.champs.first.update(value: 'valeur')
|
dossier.champs.first.update(value: 'valeur')
|
||||||
procedure.update!(draft_revision: procedure.create_new_revision, published_revision: procedure.draft_revision)
|
procedure.update!(draft_revision: procedure.create_new_revision, published_revision: procedure.draft_revision)
|
||||||
end
|
end
|
||||||
|
|
||||||
context "when using the champ's original label" do
|
context "when using the champ's original label" do
|
||||||
let(:template) { '--mon tag--' }
|
let(:template) { '--mon ancien libellé--' }
|
||||||
|
|
||||||
it "replaces the tag" do
|
it "replaces the tag" do
|
||||||
is_expected.to eq('valeur')
|
is_expected.to eq('valeur')
|
||||||
|
@ -410,7 +410,7 @@ describe TagsSubstitutionConcern, type: :model do
|
||||||
end
|
end
|
||||||
|
|
||||||
context "when using the champ's revised label" do
|
context "when using the champ's revised label" do
|
||||||
let(:template) { '--ton tag--' }
|
let(:template) { '--mon nouveau libellé--' }
|
||||||
|
|
||||||
it "replaces the tag" do
|
it "replaces the tag" do
|
||||||
is_expected.to eq('valeur')
|
is_expected.to eq('valeur')
|
||||||
|
|
Loading…
Reference in a new issue