Sha256: a43279e4a465f0b7c0e3c6e6bff3a6fd2b594bcf5c1111574fbc34341dff1880
Contents?: true
Size: 678 Bytes
Versions: 6
Compression:
Stored size: 678 Bytes
Contents
require 'spec_helper.rb' require 'ostruct' describe Faraday::ApiKey do class FauxApp def call(env) return env end end let(:faraday) { Faraday::ApiKey.new(FauxApp.new) } let(:env) { {} } describe 'call' do context 'no auth token' do it 'raises Reviewed::ConfigurationError' do expect { faraday.call(env) }.to raise_error end end context 'auth token' do let(:env) { OpenStruct.new(request: OpenStruct.new({ headers: {'X-Reviewed-Authorization' => '123'} })) } it 'does not error' do expect { faraday.call(env) }.to_not raise_error end end end end
Version data entries
6 entries across 6 versions & 1 rubygems