Sha256: 19cfab7e9b394735325b28c559d0e0e4a3740e3cb4258d3d90faef1902fa217b

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::ServerError.'
    rescue Faraday::ServerError => 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.15.1 spec/slack/web/api/errors/service_unavailable_spec.rb
slack-ruby-client-0.15.0 spec/slack/web/api/errors/service_unavailable_spec.rb