[#1110] Remove legacy tags
This commit is contained in:
parent
4b8f5933b1
commit
63ca52792b
2 changed files with 6 additions and 23 deletions
|
@ -3,7 +3,7 @@ require 'spec_helper'
|
|||
describe 'admin/mail_templates/edit.html.haml', type: :view do
|
||||
let(:procedure) { create(:procedure) }
|
||||
let(:mail_template) { create(:mail_template, procedure: procedure) }
|
||||
let(:all_tags) { mail_template.tags(reject_legacy: false) }
|
||||
let(:all_tags) { mail_template.tags }
|
||||
|
||||
before do
|
||||
allow(view).to receive(:admin_procedure_mail_template_path).and_return("/toto")
|
||||
|
@ -12,15 +12,8 @@ describe 'admin/mail_templates/edit.html.haml', type: :view do
|
|||
assign(:mail_template, mail_template)
|
||||
end
|
||||
|
||||
subject { render }
|
||||
|
||||
context "Legacy champs are not listed in the page" do
|
||||
it { expect(all_tags).to include(include({ libelle: 'numero_dossier', is_legacy: true })) }
|
||||
it { is_expected.not_to include("numero_dossier") }
|
||||
end
|
||||
|
||||
context "Non-legacy champs are listed in the page" do
|
||||
context "Champs are listed in the page" do
|
||||
it { expect(all_tags).to include(include({ libelle: 'numéro du dossier' })) }
|
||||
it { is_expected.to include("numéro du dossier") }
|
||||
it { expect(render).to include("numéro du dossier") }
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue