Sha256: 21d4f18c5bc1360f19a51ee0060647e6b4367094b216443a176c90c19e493adf
Contents?: true
Size: 1.22 KB
Versions: 1
Compression:
Stored size: 1.22 KB
Contents
require File.dirname(__FILE__) + '/../spec_helper' describe UserMailer do before(:each) do @valid_options = { :to_name => 'Test User', :to_email => 'Test@UserName.com', :token => "test_token" } end describe "welcome message" do it "should include direct link to activate the account" do mail = UserMailer.deliver_welcome_message(@valid_options) mail.body.should =~ /Hello Test User,/ end it "should include direct link to create a password" do RulesEngine::ControllerUserMail.host = "my.server.name" mail = UserMailer.deliver_welcome_message(@valid_options) mail.body.should =~ /http:\/\/my.server.name\/user\/pswd_reset\?token=test_token/ end end describe "forgot password" do it "should include direct link to activate the account" do mail = UserMailer.deliver_forgot_password(@valid_options) mail.body.should =~ /Hello Test User,/ end it "should include direct link to create a password" do RulesEngine::ControllerUserMail.host = "my.server.name" mail = UserMailer.deliver_forgot_password(@valid_options) mail.body.should =~ /http:\/\/my.server.name\/user\/pswd_reset\?token=test_token/ end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rules_engine_users-0.0.1 | rails_generators/templates/spec/models/user_mailer_spec.rb |