Sha256: a85f6e85c82c23fc8a20567fc678d2cc8a4285aefef28ec11aee5c3dcca72c84
Contents?: true
Size: 739 Bytes
Versions: 11
Compression:
Stored size: 739 Bytes
Contents
require 'spec_helper' describe ClearanceMailer do before do @user = Factory(:user) @user.forgot_password! @email = ClearanceMailer.change_password(@user) end it "should be from DO_NOT_REPLY" do Clearance.configuration.mailer_sender.should =~ /#{@email.from[0]}/i end it "should be sent to user" do @email.to.first.should =~ /#{@user.email}/i end it "should contain a link to edit the user's password" do host = ActionMailer::Base.default_url_options[:host] regexp = %r{http://#{host}/users/#{@user.id}/password/edit\?token=#{@user.confirmation_token}} @email.body.to_s.should =~ regexp end it "should set its subject" do @email.subject.should =~ /Change your password/ end end
Version data entries
11 entries across 11 versions & 1 rubygems