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