Commit 7a4ac2d8ebb90f39564232dbbc857423ca43fa23

Authored by Rodrigo Souto
1 parent 97f28847

Fixing signup anti-bot tests

test/integration/signup_test.rb
@@ -12,7 +12,7 @@ class SignupTest < ActionController::IntegrationTest @@ -12,7 +12,7 @@ class SignupTest < ActionController::IntegrationTest
12 registering_with_bot_test 5, 1 12 registering_with_bot_test 5, 1
13 end 13 end
14 assert_template 'signup' 14 assert_template 'signup'
15 - assert_match /you are a robot/, response.body 15 + assert_match /robot/, response.body
16 end 16 end
17 17
18 def test_signup_form_submission_must_not_block_after_min_signup_delay 18 def test_signup_form_submission_must_not_block_after_min_signup_delay
test/integration/user_registers_at_the_application_test.rb
@@ -19,6 +19,9 @@ class UserRegistersAtTheApplicationTest < ActionController::IntegrationTest @@ -19,6 +19,9 @@ class UserRegistersAtTheApplicationTest < ActionController::IntegrationTest
19 end 19 end
20 20
21 def test_trying_an_existing_login_name 21 def test_trying_an_existing_login_name
  22 + env = Environment.default
  23 + env.min_signup_delay = 0
  24 + env.save!
22 25
23 assert User.find_by_login('ze') # just to make sure that 'ze' already exists 26 assert User.find_by_login('ze') # just to make sure that 'ze' already exists
24 27