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