Sha256: d6f0251965a498bc6eff693fa9e2d3eadfccdd559515db9b9c6acb65de6929c0

Contents?: true

Size: 469 Bytes

Versions: 2

Compression:

Stored size: 469 Bytes

Contents

# frozen_string_literal: true
require 'spec_helper'

RSpec.describe Slack::Web::Client do
  let(:client) { described_class.new }

  it 'raises a Faraday::ClientError when Slack is unavailable',
     vcr: { cassette_name: 'web/503_error' } do
    begin
      client.auth_test
      raise 'Expected to receive Faraday::ClientError.'
    rescue Faraday::ClientError => e
      expect(e.response).not_to be_nil
      expect(e.response[:status]).to eq 503
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
slack-ruby-client-0.14.6 spec/slack/web/api/errors/service_unavailable_spec.rb
slack-ruby-client-0.14.5 spec/slack/web/api/errors/service_unavailable_spec.rb