Clarify form_spam_protection Error Message
You need cookies enabled, too (since Instiki stores session data in a cookie).
This commit is contained in:
parent
756e8aa93a
commit
af8157130a
2 changed files with 2 additions and 2 deletions
|
@ -23,7 +23,7 @@ module FormSpamProtection
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
render :text => "You must have Javascript on to submit this form.", :layout => 'error', :status => 403
|
render :text => "You must have Javascript on, and cookies enabled, to submit this form.", :layout => 'error', :status => 403
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -16,7 +16,7 @@ class FormSpamProtectionTest < Test::Unit::TestCase
|
||||||
def test_index_form_handler_is_protected
|
def test_index_form_handler_is_protected
|
||||||
post :index
|
post :index
|
||||||
assert_response 403
|
assert_response 403
|
||||||
assert_equal "You must have Javascript on to submit this form.", @response.body
|
assert_equal "You must have Javascript on, and cookies enabled, to submit this form.", @response.body
|
||||||
|
|
||||||
get :index
|
get :index
|
||||||
form_key_tag = assert_select('code input[type="hidden"]').first
|
form_key_tag = assert_select('code input[type="hidden"]').first
|
||||||
|
|
Loading…
Reference in a new issue