Sha256: 3c5357a35605adcb5e0ebc0b719b22df65aa70522537d3456210602fc766e7c8
Contents?: true
Size: 584 Bytes
Versions: 7
Compression:
Stored size: 584 Bytes
Contents
require 'rest-core/test' describe RestCore::Universal do should 'send Authorization header' do u = RestCore::Universal.new(:log_method => false) u.username = 'Aladdin' u.password = 'open sesame' u.request_full({}, u.dry)[RestCore::REQUEST_HEADERS].should.eq( {'Authorization' => 'Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ=='}) acc = {'Accept' => 'text/plain'} env = {RestCore::REQUEST_HEADERS => acc} u.request_full(env, u.dry)[RestCore::REQUEST_HEADERS].should.eq( {'Authorization' => 'Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ=='}.merge(acc)) end end
Version data entries
7 entries across 7 versions & 1 rubygems