mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
fixed some more deprecations. 20 to go
This commit is contained in:
@@ -5,14 +5,21 @@ describe VersionMailer do
|
||||
|
||||
context 'contact_email is blank' do
|
||||
before { SiteSetting.stubs(:contact_email).returns('') }
|
||||
its(:to) { should be_blank }
|
||||
|
||||
it "doesn't send the email" do
|
||||
subject.to.should be_blank
|
||||
end
|
||||
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 }
|
||||
|
||||
it "works" do
|
||||
subject.to.should == ['me@example.com']
|
||||
subject.subject.should be_present
|
||||
subject.from.should == [SiteSetting.notification_email]
|
||||
subject.body.should be_present
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user