discourse/spec/mailers/subscription_mailer_spec.rb
Loïc Guitaut 0f4beab0fb DEV: Update the rubocop-discourse gem
This enables cops related to RSpec `subject`.

See https://github.com/discourse/rubocop-discourse/pull/32
2023-06-26 11:41:52 +02:00

14 lines
330 B
Ruby

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