split login/welcome and added direct link welcome
This commit is contained in:
@ -6,32 +6,42 @@ class CandidateControllerTest < ActionDispatch::IntegrationTest
|
||||
end
|
||||
|
||||
test "should get login" do
|
||||
get welcome_path
|
||||
get login_path
|
||||
assert_response :success
|
||||
refute flash[:error].present?, "Should not be displaying an error message"
|
||||
end
|
||||
|
||||
test "should require auth and redirect" do
|
||||
get saved_path
|
||||
assert_redirected_to welcome_path
|
||||
assert_redirected_to login_path
|
||||
|
||||
get thankyou_path
|
||||
assert_redirected_to welcome_path
|
||||
assert_redirected_to login_path
|
||||
|
||||
get summary_path
|
||||
assert_redirected_to welcome_path
|
||||
assert_redirected_to login_path
|
||||
|
||||
get question_path
|
||||
assert_redirected_to welcome_path
|
||||
assert_redirected_to login_path
|
||||
|
||||
get question_path(questions(:fed1).id)
|
||||
assert_redirected_to welcome_path
|
||||
assert_redirected_to login_path
|
||||
end
|
||||
|
||||
test "should auth to question" do
|
||||
test "should auth to welcome" do
|
||||
setup_auth candidates(:martha)
|
||||
|
||||
assert_redirected_to question_path
|
||||
assert_redirected_to welcome_path
|
||||
assert session[:test_id].present?
|
||||
refute flash[:error].present?, "Should not be displaying an error message"
|
||||
end
|
||||
|
||||
test "should auth directly to welcome" do
|
||||
get login_path(candidates(:martha).test_hash)
|
||||
|
||||
assert_redirected_to welcome_path
|
||||
assert session[:test_id].present?
|
||||
refute flash[:error].present?, "Should not be displaying an error message"
|
||||
end
|
||||
|
||||
test "should redirect to thankyou when completed" do
|
||||
|
Reference in New Issue
Block a user