mirror of
https://github.com/discourse/discourse.git
synced 2024-12-02 08:03:44 +08:00
c9dab6fd08
It's very easy to forget to add `require 'rails_helper'` at the top of every core/plugin spec file, and omissions can cause some very confusing/sporadic errors. By setting this flag in `.rspec`, we can remove the need for `require 'rails_helper'` entirely.
19 lines
427 B
Ruby
19 lines
427 B
Ruby
# frozen_string_literal: true
|
|
|
|
describe TestMailer do
|
|
|
|
describe "send_test" do
|
|
|
|
it "works" do
|
|
test_mailer = TestMailer.send_test('marcheline@adventuretime.ooo')
|
|
|
|
expect(test_mailer.from).to eq([SiteSetting.notification_email])
|
|
expect(test_mailer.to).to eq(['marcheline@adventuretime.ooo'])
|
|
expect(test_mailer.subject).to be_present
|
|
expect(test_mailer.body).to be_present
|
|
end
|
|
|
|
end
|
|
|
|
end
|