Sha256: d5787df15b86bfb14aa9354e06401ad2342c143ebb15264927c4d912fb998802

Contents?: true

Size: 666 Bytes

Versions: 1

Compression:

Stored size: 666 Bytes

Contents

require 'test_helper'

begin
  require 'airbrake'
rescue LoadError
  warn 'Install airbrake gem to run Airbrake tests.'
end

if defined? Airbrake
  require 'resque/failure/airbrake'
  context 'Airbrake' do
    test 'should be notified of an error' do
      exception = StandardError.new('BOOM')
      worker = Resque::Worker.new(:test)
      queue = 'test'
      payload = { 'class' => Object, 'args' => 66 }

      Airbrake.expects(:notify_or_ignore).with(
        exception,
        parameters: { payload_class: 'Object', payload_args: '66' })

      backend = Resque::Failure::Airbrake.new(exception, worker, queue, payload)
      backend.save
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
resque-loner-1.3.0 test/airbrake_test.rb