Fix misleading error code when receiving invalid WebAuthn credentials (#23568)
This commit is contained in:
		
					parent
					
						
							
								cf50667e26
							
						
					
				
			
			
				commit
				
					
						a232a1feb8
					
				
			
		
					 2 changed files with 3 additions and 3 deletions
				
			
		|  | @ -248,7 +248,7 @@ describe Settings::TwoFactorAuthentication::WebauthnCredentialsController do | |||
| 
 | ||||
|               post :create, params: { credential: new_webauthn_credential, nickname: 'USB Key' } | ||||
| 
 | ||||
|               expect(response).to have_http_status(500) | ||||
|               expect(response).to have_http_status(422) | ||||
|               expect(flash[:error]).to be_present | ||||
|             end | ||||
|           end | ||||
|  | @ -268,7 +268,7 @@ describe Settings::TwoFactorAuthentication::WebauthnCredentialsController do | |||
| 
 | ||||
|               post :create, params: { credential: new_webauthn_credential, nickname: nickname } | ||||
| 
 | ||||
|               expect(response).to have_http_status(500) | ||||
|               expect(response).to have_http_status(422) | ||||
|               expect(flash[:error]).to be_present | ||||
|             end | ||||
|           end | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue