Sha256: 12927bd937f6da1fcddea5c17d71d1a2fd19e385470d46a5805b4e9134748225
Contents?: true
Size: 595 Bytes
Versions: 18
Compression:
Stored size: 595 Bytes
Contents
require 'test_helper' describe Fanforce::Worker do before do clean_dbs end it 'should enqueue a job' do Fanforce::Worker.enqueue('test', {name: 'caleb'}) assert Fanforce::Worker.iron_mq.queue('test').size == 1 end it 'should run an enqueued job' do Fanforce::Worker.enqueue('test', {name: 'caleb'}) processed_job = false Fanforce::Worker.run({'queue_id' => 'test'}) do |params| processed_job = true assert params[:name] == 'caleb' end assert processed_job == true assert Fanforce::Worker.iron_mq.queue('test').size == 0 end end
Version data entries
18 entries across 18 versions & 1 rubygems