Submit summary
This commit is contained in:
@ -57,11 +57,22 @@ class CandidateControllerTest < ActionDispatch::IntegrationTest
|
||||
assert_equal qid, flash[:answer_error]
|
||||
end
|
||||
|
||||
test "should send mailers on submission" do
|
||||
test "should NOT send mailers on submission" do
|
||||
setup_auth candidates(:dawn)
|
||||
|
||||
assert_difference("ActionMailer::Base.deliveries.size", 0) do
|
||||
post post_summary_path
|
||||
end
|
||||
assert_redirected_to summary_path
|
||||
assert_match 'must complete', flash[:error]
|
||||
end
|
||||
|
||||
test "should send mailers on submission" do
|
||||
setup_auth candidates(:peggy)
|
||||
|
||||
assert_difference("ActionMailer::Base.deliveries.size", 3) do
|
||||
post post_summary_path
|
||||
end
|
||||
assert_redirected_to thankyou_path
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user