fixed some more deprecations. 20 to go

This commit is contained in:
Régis Hanol
2014-10-29 16:06:50 +01:00
parent 44ff357e1c
commit ada750b384
6 changed files with 58 additions and 35 deletions
+12 -5
View File
@@ -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