Sha256: bdb0e6d584683a9b290cafd5158b299d50502ab3affaa1d3004c1309aee933b6

Contents?: true

Size: 815 Bytes

Versions: 6

Compression:

Stored size: 815 Bytes

Contents

# frozen_string_literal: true

require 'spec_helper'

class Raven
  # mock Sentry
end

RSpec.describe UniformNotifier::SentryNotifier do
  it 'should not notify sentry' do
    expect(UniformNotifier::SentryNotifier.out_of_channel_notify(title: 'notify sentry')).to be_nil
  end

  it 'should notify sentry' do
    expect(Raven).to receive(:capture_exception).with(UniformNotifier::Exception.new('notify sentry'), {})

    UniformNotifier.sentry = true
    UniformNotifier::SentryNotifier.out_of_channel_notify(title: 'notify sentry')
  end

  it 'should notify sentry' do
    expect(Raven).to receive(:capture_exception).with(UniformNotifier::Exception.new('notify sentry'), foo: :bar)

    UniformNotifier.sentry = { foo: :bar }
    UniformNotifier::SentryNotifier.out_of_channel_notify('notify sentry')
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
uniform_notifier-1.14.0 spec/uniform_notifier/sentry_spec.rb
uniform_notifier-1.13.2 spec/uniform_notifier/sentry_spec.rb
uniform_notifier-1.13.1 spec/uniform_notifier/sentry_spec.rb
uniform_notifier-1.13.0 spec/uniform_notifier/sentry_spec.rb
uniform_notifier-1.12.1 spec/uniform_notifier/sentry_spec.rb
uniform_notifier-1.12.0 spec/uniform_notifier/sentry_spec.rb