Sha256: e5ead383db9e11812d9700af7d9983f4a0c2255c419f048d6a7ddc49703fdb86

Contents?: true

Size: 679 Bytes

Versions: 20

Compression:

Stored size: 679 Bytes

Contents

require 'spec_helper'

RSpec.describe Slack::Web::Api::Endpoints::Auth do
  let(:client) { Slack::Web::Client.new }
  context 'without auth', vcr: { cassette_name: 'web/auth_test_error' } do
    it 'fails with an exception' do
      expect { client.auth_test }.to raise_error Slack::Web::Api::Error, 'not_authed'
    end
  end
  context 'with auth', vcr: { cassette_name: 'web/auth_test_success' } do
    it 'succeeds' do
      expect { client.auth_test }.to_not raise_error
    end
  end
  context '429 error', vcr: { cassette_name: 'web/429_error' } do
    it 'fails with an exception' do
      expect { client.auth_test }.to raise_error Faraday::ClientError
    end
  end
end

Version data entries

20 entries across 20 versions & 2 rubygems

Version Path
slack-ruby-client-bhe-0.5.5 spec/slack/web/api/endpoints/auth_spec.rb
slack-ruby-client-bhe-0.5.4 spec/slack/web/api/endpoints/auth_spec.rb
slack-ruby-client-0.8.1 spec/slack/web/api/endpoints/custom_specs/auth_spec.rb
slack-ruby-client-0.8.0 spec/slack/web/api/endpoints/custom_specs/auth_spec.rb
slack-ruby-client-0.7.9 spec/slack/web/api/endpoints/custom_specs/auth_spec.rb
slack-ruby-client-0.7.8 spec/slack/web/api/endpoints/custom_specs/auth_spec.rb
slack-ruby-client-0.7.7 spec/slack/web/api/endpoints/custom_specs/auth_spec.rb
slack-ruby-client-0.7.6 spec/slack/web/api/endpoints/custom_specs/auth_spec.rb
slack-ruby-client-0.7.5 spec/slack/web/api/endpoints/custom_specs/auth_spec.rb
slack-ruby-client-0.7.4 spec/slack/web/api/endpoints/custom_specs/auth_spec.rb
slack-ruby-client-0.7.3 spec/slack/web/api/endpoints/custom_specs/auth_spec.rb
slack-ruby-client-0.7.2 spec/slack/web/api/endpoints/custom_specs/auth_spec.rb
slack-ruby-client-0.7.1 spec/slack/web/api/endpoints/custom_specs/auth_spec.rb
slack-ruby-client-0.7.0 spec/slack/web/api/endpoints/custom_specs/auth_spec.rb
slack-ruby-client-0.6.0 spec/slack/web/api/endpoints/custom_specs/auth_spec.rb
slack-ruby-client-0.5.4 spec/slack/web/api/endpoints/auth_spec.rb
slack-ruby-client-0.5.3 spec/slack/web/api/endpoints/auth_spec.rb
slack-ruby-client-0.5.2 spec/slack/web/api/endpoints/auth_spec.rb
slack-ruby-client-0.5.1 spec/slack/web/api/endpoints/auth_spec.rb
slack-ruby-client-0.5.0 spec/slack/web/api/endpoints/auth_spec.rb