GRN2-196: Fixed issues that scrutinizer is complaining about (#765)

* Refactored code to improve scrutinizer score

* Bug fixes
This commit is contained in:
farhatahmad
2019-08-27 11:08:58 -04:00
committed by farhatahmad
parent fd6077696d
commit 01b8dbbd0e
33 changed files with 462 additions and 434 deletions

View File

@ -50,7 +50,7 @@ describe PasswordResetsController, type: :controller do
expect(response).to redirect_to(root_path)
end
it "reloads the page if no email exists in the database" do
it "redirects to root with success flash if email does not exists" do
params = {
password_reset: {
email: nil,
@ -58,7 +58,8 @@ describe PasswordResetsController, type: :controller do
}
post :create, params: params
expect(response).to redirect_to(new_password_reset_path)
expect(flash[:success]).to be_present
expect(response).to redirect_to(root_path)
end
end