fix: password_complexity check must use a post verb

This commit is contained in:
simon lehericey 2024-12-09 11:23:41 +01:00
parent 7603b7c1f1
commit 7d48c294d6
No known key found for this signature in database
GPG key ID: CDE670D827C7B3C5
2 changed files with 2 additions and 2 deletions

View file

@ -171,7 +171,7 @@ Rails.application.routes.draw do
get 'logout' => 'users/sessions#logout'
end
get 'password_complexity' => 'password_complexity#show', as: 'show_password_complexity'
post 'password_complexity' => 'password_complexity#show', as: 'show_password_complexity'
get 'check_email' => 'email_checker#show', as: 'show_email_suggestions'
resources :targeted_user_links, only: [:show]

View file

@ -6,7 +6,7 @@ describe PasswordComplexityController, type: :controller do
{ user: { password: 'motDePasseTropFacile' } }
end
subject { get :show, format: :turbo_stream, params: params }
subject { post :show, format: :turbo_stream, params: params }
it 'computes a password score' do
subject