Project

General

Profile

Download (401 Bytes) Statistics
| Branch: | Tag: | Revision:
require 'test_helper'

class StoredValuesCleanupJobTest < ActiveJob::TestCase
def setup
@job = StoredValuesCleanupJob.new
end

it 'removes expired stored values and enqueue itself' do
scope = Minitest::Mock.new
scope.expect('destroy_all', nil)
StoredValue.expects(:expired).with(0).returns(scope)
@job.perform_now
assert scope.verify
assert_enqueued_jobs 1
end
end
(1-1/2)