Created
September 25, 2008 14:50
-
-
Save uhlenbrock/12832 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class UserMailer < ActionMailer::Base | |
def signup_notification(user) | |
setup_email(user) | |
@subject += "One final step: please activate." | |
@body[:url] = "http://#{user.site.domain}/activate/#{user.activation_code}" | |
@body[:code] = user.activation_code | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
context "The User Mailer", ActionMailer::TestCase do | |
tests UserMailer | |
specify "should send a confirmation on signup" do | |
response = UserMailer.create_signup_notification(@quentin) | |
response.subject.should.be "#{user.site.title}: One final step: please activate." | |
response.body.should.match "http://#{user.site.domain}/activate/#{user.activation_code}" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment