Sha256: c27ea1c74f7063b1d1874f7d152d6c01ee292e79d264b4eed4849a5b5231459c

Contents?: true

Size: 478 Bytes

Versions: 5

Compression:

Stored size: 478 Bytes

Contents

# frozen_string_literal: true
require 'spec_helper'

RSpec.describe Slack::RealTime::Client, vcr: { cassette_name: 'web/rtm_connect' } do
  include_context 'connected client'

  it 'is not fatal' do
    event = Slack::RealTime::Event.new(
      'type' => 'pref_change',
      'name' => 'push_sound',
      'value' => 'updated.mp3'
    )
    expect(client.self).to receive(:prefs) { raise ArgumentError }
    expect { client.send(:dispatch, event) }.not_to raise_error
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
slack-ruby-client-2.4.0 spec/slack/real_time/event_handlers/event_handlers_spec.rb
slack-ruby-client-2.3.0 spec/slack/real_time/event_handlers/event_handlers_spec.rb
slack-ruby-client-2.2.0 spec/slack/real_time/event_handlers/event_handlers_spec.rb
slack-ruby-client-2.1.0 spec/slack/real_time/event_handlers/event_handlers_spec.rb
slack-ruby-client-2.0.0 spec/slack/real_time/event_handlers/event_handlers_spec.rb