require'rails_helper'describeUploadChecksumWorkerdodescribe'#perform'doit'rescues ActiveRecord::RecordNotFound'doexpect{described_class.new.perform(999_999)}.not_toraise_errorendit'calls calculate_checksum_without_delay and save!'doupload=spyexpect(Upload).toreceive(:find).with(999_999).and_return(upload)described_class.new.perform(999_999)expect(upload).tohave_received(:calculate_checksum)expect(upload).tohave_received(:save!)endendend