Sha256: 7c3ee180332f62f439003c9def41e3fdb3f3cca73a859d5af02a80967ee2b603
Contents?: true
Size: 456 Bytes
Versions: 49
Compression:
Stored size: 456 Bytes
Contents
# frozen_string_literal: true require 'rails_helper' describe LHC::Auth do before(:each) do LHC.config.interceptors = [LHC::Auth] end it 'adds basic auth to every request' do options = { basic: { username: 'steve', password: 'can' } } LHC.config.endpoint(:local, 'http://local.ch', auth: options) stub_request(:get, 'http://local.ch') .with(headers: { 'Authorization' => 'Basic c3RldmU6Y2Fu' }) LHC.get(:local) end end
Version data entries
49 entries across 49 versions & 1 rubygems