2 require "minitest/mock"
 
   4 class TraceDestroyerJobTest < ActiveJob::TestCase
 
   5   def test_destroy_called
 
   6     trace = Minitest::Mock.new
 
   8     # Tiny little bit of mocking to make activejob happy
 
   9     trace.expect :is_a?, false, [TraceDestroyerJob]
 
  11     # Check that trace.destroy is called
 
  12     trace.expect :destroy, true
 
  14     TraceDestroyerJob.perform_now(trace)