Sha256: 264b10c84eb0723bff20066e898a535a033ca22cbfcc392212694f17ea381654
Contents?: true
Size: 707 Bytes
Versions: 25
Compression:
Stored size: 707 Bytes
Contents
require 'spec_helper' require 'rollbar/delayed_job' require 'delayed/backend/test' describe Rollbar::Delayed::JobData do describe '#to_hash' do let(:handler) { { 'foo' => 'bar' } } let(:attrs) do { 'id' => 1, 'priority' => 0, 'attempts' => 1, 'handler' => handler.to_yaml } end let(:job) do ::Delayed::Backend::Test::Job.new(attrs) end subject { described_class.new(job) } it 'returns the correct job data' do expected_result = attrs.dup expected_result.delete('id') expected_result['handler'] = handler result = subject.to_hash expect(result).to be_eql(expected_result) end end end
Version data entries
25 entries across 25 versions & 1 rubygems