]> git.openstreetmap.org Git - rails.git/commitdiff
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 73c8cebbe507685dd4013c5345319ba7aa483b74..bf30e69414d30d298127b91ff76d5d3b783ce04d 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