Created
July 14, 2012 18:53
-
-
Save anonymous/3112657 to your computer and use it in GitHub Desktop.
UserPasswordResetsController
This file contains hidden or 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
require 'spec_helper' | |
describe UserPasswordResetsController do | |
describe 'POST #create' do | |
before(:each) do | |
@user = create(:user, customer_id: 1, email: '[email protected]') | |
end | |
let(:make_valid_request) { post :create, { email: '[email protected]' } } | |
let(:make_invalid_request) { post :create, { email: '[email protected]' } } | |
context 'successful requests' do | |
it 'sends 1 password reset email to the user' do | |
User.any_instance.should_receive(:send_password_reset) | |
make_valid_request | |
end | |
it 'render :create template' do | |
make_valid_request | |
response.should render_template(:create) | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment