Asana/ruby-asana

View on GitHub
spec/asana/authentication/oauth2/bearer_token_authentication_spec.rb

Summary

Maintainability
A
0 mins
Test Coverage
# frozen_string_literal: true

RSpec.describe Asana::Authentication::OAuth2::BearerTokenAuthentication do
  let(:token) { 'MYTOKEN' }
  let(:auth) { described_class.new(token) }
  let(:conn) do
    Faraday.new do |builder|
      auth.configure(builder)
    end
  end

  it 'configures Faraday to use OAuth2 authentication with a bearer token' do
    expect(conn.builder.handlers).to include(Faraday::Request::Authorization)
  end
end