Skip to content

Commit d2351e3

Browse files
tests: fix test failing when running against devise v5.0
1 parent 83326f9 commit d2351e3

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

spec/requests/devise/passkey_authentication_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def generate_assertion(fake_client, challenge:, credential:)
9797

9898
expect(response).to have_http_status(:unprocessable_entity)
9999
expect(response.body).to include("Log in")
100-
expect(flash[:alert]).to eq("Invalid Email or password.") # TODO: CHANGE THIS
100+
expect(flash[:alert]).to match(/Invalid email or password/i) # TODO: CHANGE THIS
101101
expect(controller.current_account).to be_nil
102102
end
103103
end

spec/requests/devise/two_factor_authentication_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ def generate_assertion(fake_client, challenge:, credential:)
176176

177177
expect(response).to have_http_status(:unprocessable_entity)
178178
expect(response.body).to include("Use security key")
179-
expect(flash[:alert]).to eq("Invalid Email or password.") # TODO: CHANGE THIS
179+
expect(flash[:alert]).to match(/Invalid email or password/i) # TODO: CHANGE THIS
180180
expect(controller.current_account).to be_nil
181181
end
182182
end

0 commit comments

Comments
 (0)