Updated Register Module.
Worlflow 1- Register 1.1 Create a new temporal user 1.2 Email to the new User 1.3 Email to Web Master 2 Web Master Review th Account Application 2.1 Accept and Send an confirmation email to the user and remove the temporal user 2.2 Reject the application send a rejection email to the user and remove the temporal Added a new table to save temporal users to review their Application to the site. Updated Register Form with an new input Application and Recaptcha validation. Updated Emails templates and messages. (TODO improve messages) Updated mails templates. Simple messages (Todo improve messages). Added a new handler to reject a user Updated existing hanlders to handler the new workflow.
This commit is contained in:
69
library/recaptcha/test/recaptcha_api_test_set.e
Normal file
69
library/recaptcha/test/recaptcha_api_test_set.e
Normal file
@@ -0,0 +1,69 @@
|
||||
note
|
||||
description: "[
|
||||
Eiffel tests that can be executed by testing tool.
|
||||
]"
|
||||
author: "EiffelStudio test wizard"
|
||||
date: "$Date: 2015-01-14 15:37:57 -0300 (mi. 14 de ene. de 2015) $"
|
||||
revision: "$Revision: 96458 $"
|
||||
testing: "type/manual"
|
||||
|
||||
class
|
||||
RECAPTCHA_API_TEST_SET
|
||||
|
||||
inherit
|
||||
EQA_TEST_SET
|
||||
|
||||
feature -- Test routines
|
||||
|
||||
test_invalid_input
|
||||
-- invalid-input-response
|
||||
local
|
||||
l_captcha: RECAPTCHA_API
|
||||
do
|
||||
create l_captcha.make ("","234")
|
||||
check
|
||||
not_true:not l_captcha.verify
|
||||
end
|
||||
assert ("Not true", not l_captcha.verify)
|
||||
assert ("Has error invalid-input-response",has_error (l_captcha,"invalid-input-response"))
|
||||
end
|
||||
|
||||
test_missing_input
|
||||
-- missing-input-response
|
||||
local
|
||||
l_captcha: RECAPTCHA_API
|
||||
do
|
||||
create l_captcha.make ("key","")
|
||||
check
|
||||
not_true:not l_captcha.verify
|
||||
end
|
||||
assert ("Not true", not l_captcha.verify)
|
||||
assert ("Has error missing-input-response",has_error (l_captcha,"missing-input-response"))
|
||||
end
|
||||
|
||||
test_missing_key_input
|
||||
-- missing-input-response
|
||||
-- invalid-input-response
|
||||
local
|
||||
l_captcha: RECAPTCHA_API
|
||||
do
|
||||
create l_captcha.make ("","")
|
||||
l_captcha.set_remoteip("localhost")
|
||||
assert ("Not true", not l_captcha.verify)
|
||||
assert ("Has error missing-input-response",has_error (l_captcha,"missing-input-response"))
|
||||
assert ("Has error invalid-input-response",has_error (l_captcha,"invalid-input-response"))
|
||||
end
|
||||
|
||||
feature {NONE} -- Implementation
|
||||
|
||||
has_error (l_captcha: RECAPTCHA_API; a_error: READABLE_STRING_32): BOOLEAN
|
||||
do
|
||||
if attached l_captcha.errors as l_errors then
|
||||
l_errors.compare_objects
|
||||
Result := l_errors.has (a_error)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user