Submit summary
This commit is contained in:
1 parent
988f1346c1
commit
7bdb86f89f
6 files changed
+135
-14
No files matched your search
@@ -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