2020-06-24 03:31:20 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2022-07-27 22:27:38 -04:00
|
|
|
RSpec.describe SubscriptionMailer do
|
2023-06-21 10:00:19 -04:00
|
|
|
subject(:mail) { SubscriptionMailer.confirm_unsubscribe(user) }
|
2020-06-24 03:31:20 -04:00
|
|
|
|
2023-06-21 10:00:19 -04:00
|
|
|
fab!(:user) { Fabricate(:user) }
|
2020-06-24 03:31:20 -04:00
|
|
|
|
|
|
|
it "contains the right URL" do
|
2023-06-21 10:00:19 -04:00
|
|
|
expect(mail.body).to include(
|
2020-06-24 03:31:20 -04:00
|
|
|
"#{Discourse.base_url}/email/unsubscribe/#{UnsubscribeKey.last.key}",
|
|
|
|
)
|
|
|
|
end
|
|
|
|
end
|