Skip to content

Commit

Permalink
#14 Added test to check send_password if blank email is passed
Browse files Browse the repository at this point in the history
  • Loading branch information
therealppk committed Oct 26, 2022
1 parent 39c47df commit 781d6f4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions spec/controllers/password_retrieval_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@
expect(response).to render_template 'password_retrieval/forgotten'
expect(flash[:error]).to be_present
end
it 'if user in request param is blank flash error' do
request_params = { user: { email: '' } }
post :send_password, params: request_params
expect(response).to render_template 'password_retrieval/forgotten'
expect(flash[:error]).to be_present
end
end

describe 'check if token is expired' do
Expand Down

0 comments on commit 781d6f4

Please sign in to comment.