14 lines
No EOL
429 B
Ruby
14 lines
No EOL
429 B
Ruby
require 'spec_helper'
|
|
|
|
describe Jobs::ResetPassword do
|
|
describe "#perform" do
|
|
it "given a user id it sends the reset password instructions for that user" do
|
|
user = Factory :user
|
|
expect {
|
|
mail = Jobs::ResetPassword.perform(user.id)
|
|
mail.to.should == [user.email]
|
|
mail.body.should include("change your password")
|
|
}.to change(Devise.mailer.deliveries, :length).by(1)
|
|
end
|
|
end
|
|
end |