Sha256: e749dfc546483aba3727078eda3f7b39931b49f29474cf1874167fc431a5b8d3
Contents?: true
Size: 476 Bytes
Versions: 49
Compression:
Stored size: 476 Bytes
Contents
# frozen_string_literal: true require 'rails_helper' describe LHC::Auth do before(:each) do LHC.config.interceptors = [LHC::Auth] end it 'adds the bearer token to every request' do def bearer_token '123456' end options = { bearer: -> { bearer_token } } LHC.config.endpoint(:local, 'http://local.ch', auth: options) stub_request(:get, 'http://local.ch').with(headers: { 'Authorization' => 'Bearer 123456' }) LHC.get(:local) end end
Version data entries
49 entries across 49 versions & 1 rubygems