Sha256: a9f28101e7cbb21c79d1701ae0467ce7a32f248a23425efa4e2c3c15ba9e184f

Contents?: true

Size: 562 Bytes

Versions: 2

Compression:

Stored size: 562 Bytes

Contents

# frozen_string_literal: true

RSpec.shared_context 'valid access token' do
  before do
    stub_request(:get, 'auth.g5search.com/oauth/token/info')
      .with(headers: { 'Authorization' => "Bearer #{token_value}" })
      .to_return(status: 200,
                 body: raw_token_info.to_json,
                 headers: { 'Content-Type' => 'application/json' })
  end

  let(:raw_token_info) do
    {
      'resource_owner_id' => '42',
      'scopes' => [],
      'expires_in_seconds' => 120,
      'application' => { 'uid' => 'abcdefg112358' }
    }
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
g5_authenticatable_api-1.0.0 spec/support/shared_contexts/valid_access_token.rb
g5_authenticatable_api-1.0.0.pre.1 spec/support/shared_contexts/valid_access_token.rb