Sha256: 6f5a452a535d39130be5309edfe2ba3167a7fad08b435722959f932577c415cb
Contents?: true
Size: 445 Bytes
Versions: 3
Compression:
Stored size: 445 Bytes
Contents
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
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
lhc-core-interceptors-2.0.1 | spec/auth/bearer_spec.rb |
lhc-core-interceptors-2.0.0 | spec/auth/bearer_spec.rb |
lhc-core-interceptors-1.0.0 | spec/auth/bearer_spec.rb |