Clear notifications after trace import tests
authorTom Hughes <tom@compton.nu>
Tue, 29 Jan 2019 00:00:46 +0000 (00:00 +0000)
committerTom Hughes <tom@compton.nu>
Tue, 29 Jan 2019 00:00:46 +0000 (00:00 +0000)
test/jobs/trace_importer_job_test.rb

index 73c8ceb..bf30e69 100644 (file)
@@ -22,6 +22,8 @@ class TraceImporterJobTest < ActiveJob::TestCase
     email = ActionMailer::Base.deliveries.last
     assert_equal trace.user.email, email.to[0]
     assert_match(/success/, email.subject)
+
+    ActionMailer::Base.deliveries.clear
   end
 
   def test_failure_notification
@@ -44,6 +46,8 @@ class TraceImporterJobTest < ActiveJob::TestCase
     email = ActionMailer::Base.deliveries.last
     assert_equal trace.user.email, email.to[0]
     assert_match(/failure/, email.subject)
+
+    ActionMailer::Base.deliveries.clear
   end
 
   def test_error_notification
@@ -60,5 +64,7 @@ class TraceImporterJobTest < ActiveJob::TestCase
     email = ActionMailer::Base.deliveries.last
     assert_equal trace.user.email, email.to[0]
     assert_match(/failure/, email.subject)
+
+    ActionMailer::Base.deliveries.clear
   end
 end