Sha256: 153d8de1e4604af70db22279827e1fc349c028f4f7b0a25a1f9969e673eca171
Contents?: true
Size: 819 Bytes
Versions: 18
Compression:
Stored size: 819 Bytes
Contents
require 'test_helper' require 'fanforce/worker/errors' describe Fanforce::Worker::Errors do before do clean_dbs end it 'should save error to redis' do Fanforce::Worker.enqueue('test', {name: 'caleb'}) ran_job = false Fanforce::Worker.run({'queue_id' => 'test'}) do |params| ran_job = true raise 'test' end assert ran_job == true assert Fanforce::Worker::Errors.list_summaries('test').size == 1 assert Fanforce::Worker.iron_mq.queue('test').size == 0 end it 'should correctly retry error' do Fanforce::Worker.enqueue('test', {name: 'caleb'}) Fanforce::Worker.run({'queue_id' => 'test'}) do |params| raise 'test' end assert Fanforce::Worker::Errors.list('test').retry assert Fanforce::Worker.iron_mq.queue('test').size == 1 end end
Version data entries
18 entries across 18 versions & 1 rubygems