Sha256: 86b9958475acd46a42324ff57dfbaba51bcae8d4ed949e3d021ea328a69c2c28

Contents?: true

Size: 662 Bytes

Versions: 20

Compression:

Stored size: 662 Bytes

Contents

require File.expand_path(File.dirname(__FILE__)+'/../spec_helper')
describe Restfully::HTTP::Headers do
  class IncludeHeadersModule
    include Restfully::HTTP::Headers
  end
  
  it "should correctly parse headers" do
    sanitized_headers = IncludeHeadersModule.new.sanitize_http_headers('accept' => 'application/json', :x_remote_ident => 'crohr', 'X_GVI' => 'sid', 'CACHE-CONTROL' => ['max-age=0', 'no-cache'], 'Content-Length' => 22)
    sanitized_headers.should == {
      'Accept' => 'application/json',
      'X-Remote-Ident' => 'crohr',
      'X-Gvi' => 'sid',
      'Cache-Control' => 'max-age=0, no-cache',
      'Content-Length' => 22
    }
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
restfully-0.6.3 spec/http/headers_spec.rb
restfully-0.6.2 spec/http/headers_spec.rb
restfully-0.6.1 spec/http/headers_spec.rb
restfully-0.6.0 spec/http/headers_spec.rb
restfully-0.5.10 spec/http/headers_spec.rb
restfully-0.5.9 spec/http/headers_spec.rb
restfully-0.5.8 spec/http/headers_spec.rb
restfully-0.5.7 spec/http/headers_spec.rb
restfully-0.5.6 spec/http/headers_spec.rb
restfully-0.5.5 spec/http/headers_spec.rb
restfully-0.5.4 spec/http/headers_spec.rb
restfully-0.5.3 spec/http/headers_spec.rb
restfully-0.5.2 spec/http/headers_spec.rb
restfully-0.5.1 spec/http/headers_spec.rb
restfully-0.5.0 spec/http/headers_spec.rb
restfully-0.4.1 spec/http/headers_spec.rb
restfully-0.4.0 spec/http/headers_spec.rb
restfully-0.3.2 spec/http/headers_spec.rb
restfully-0.3.1 spec/http/headers_spec.rb
restfully-0.3.0 spec/http/headers_spec.rb