Sha256: 9914fbb066a4fcd41c2abfd9922e2334a8a38f825cb302dc382c3837a883f925

Contents?: true

Size: 418 Bytes

Versions: 3

Compression:

Stored size: 418 Bytes

Contents

require 'net/http'
require File.expand_path('../fixtures/classes', __FILE__)

describe "Net::HTTPHeader#basic_auth when passed account, password" do
  before(:each) do
    @headers = NetHTTPHeaderSpecs::Example.new
  end

  it "sets the 'Authorization' Header entry for basic authorization" do
    @headers.basic_auth("rubyspec", "rocks")
    @headers["Authorization"].should == "Basic cnVieXNwZWM6cm9ja3M="
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rubysl-net-http-1.0.1 spec/httpheader/basic_auth_spec.rb
rubysl-net-http-2.0.4 spec/httpheader/basic_auth_spec.rb
rubysl-net-http-1.0.0 spec/httpheader/basic_auth_spec.rb