diff --git a/spec/models/email_template_spec.rb b/spec/models/email_template_spec.rb index f765ebcd..b749bdae 100644 --- a/spec/models/email_template_spec.rb +++ b/spec/models/email_template_spec.rb @@ -3,20 +3,20 @@ require "rails_helper" RSpec.describe EmailTemplate, type: :model do - describe "#reason?" do + describe "#accepts_custom_reason?" do it "returns true if a reason is present in the body" do template = EmailTemplate.new(body: " ... {{ denial_reason }}...") - expect(template.reason?).to eq(true) + expect(template.accepts_custom_reason?).to be_true end it "returns true even if there are other liquid filters" do template = EmailTemplate.new(body: " ... {{denial_reason|strip_tags}}...") - expect(template.reason?).to eq(true) + expect(template.accepts_custom_reason?).to be_true end it "returns false if no reason is in the body" do template = EmailTemplate.new - expect(template.reason?).to eq(false) + expect(template.accepts_custom_reason?).to be_false end end end