Skip to content

Commit

Permalink
fix some test brittleness
Browse files Browse the repository at this point in the history
  • Loading branch information
timcowlishaw committed Feb 22, 2024
1 parent b23552a commit b767c4e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/controllers/users/registrations_controller.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
class Users::RegistrationsController < Devise::RegistrationsController
invisible_captcha only: [:create]
invisible_captcha only: [:create] unless Rails.env.test?
end
4 changes: 3 additions & 1 deletion test/system/sign_up_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ class SignUpTest < ApplicationSystemTestCase
fill_in "Email", with: "[email protected]"
fill_in "Password", with: "password123", match: :prefer_exact
fill_in "Password confirmation", with: "password123"
sleep 4 # The invisible_captcha bot protection will kick in if this is too quick

click_on "Get Started"

assert_text "A message with a confirmation link has been sent to your email address."

user = User.last
assert_equal user.email, "[email protected]"

Expand Down

0 comments on commit b767c4e

Please sign in to comment.