discourse/spec/mailers/subscription_mailer_spec.rb
2020-06-24 09:31:20 +02:00

14 lines
331 B
Ruby

# frozen_string_literal: true
require "rails_helper"
describe SubscriptionMailer do
fab!(:user) { Fabricate(:user) }
subject { SubscriptionMailer.confirm_unsubscribe(user) }
it "contains the right URL" do
expect(subject.body).to include("#{Discourse.base_url}/email/unsubscribe/#{UnsubscribeKey.last.key}")
end
end