2018-01-04 10:37:40 +01:00
|
|
|
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) }
|
2018-01-04 16:34:23 +01:00
|
|
|
let(:all_tags) { mail_template.tags }
|
2018-01-04 10:37:40 +01:00
|
|
|
|
|
|
|
before do
|
|
|
|
allow(view).to receive(:admin_procedure_mail_template_path).and_return("/toto")
|
|
|
|
allow(view).to receive(:admin_procedure_mail_templates_path).and_return("/toto")
|
|
|
|
|
|
|
|
assign(:mail_template, mail_template)
|
|
|
|
end
|
|
|
|
|
2018-01-04 16:34:23 +01:00
|
|
|
context "Champs are listed in the page" do
|
2018-01-04 10:37:40 +01:00
|
|
|
it { expect(all_tags).to include(include({ libelle: 'numéro du dossier' })) }
|
2018-01-04 16:34:23 +01:00
|
|
|
it { expect(render).to include("numéro du dossier") }
|
2018-01-04 10:37:40 +01:00
|
|
|
end
|
|
|
|
end
|