mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 13:31:44 +08:00
19 lines
535 B
Ruby
19 lines
535 B
Ruby
require "spec_helper"
|
|
|
|
describe VersionMailer do
|
|
subject { VersionMailer.send_notice }
|
|
|
|
context 'contact_email is blank' do
|
|
before { SiteSetting.stubs(:contact_email).returns('') }
|
|
its(:to) { should be_blank }
|
|
end
|
|
|
|
context 'contact_email is set' do
|
|
before { SiteSetting.stubs(:contact_email).returns('me@example.com') }
|
|
its(:to) { should == ['me@example.com'] }
|
|
its(:subject) { should be_present }
|
|
its(:from) { should == [SiteSetting.notification_email] }
|
|
its(:body) { should be_present }
|
|
end
|
|
end
|