Sha256: 11a3a261c98fbefa2398ff5d69680d7c63caf139e2b91e52bf8d59717340127f

Contents?: true

Size: 644 Bytes

Versions: 5

Compression:

Stored size: 644 Bytes

Contents

require 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

5 entries across 5 versions & 2 rubygems

Version Path
crohr-restfully-0.2.1 spec/http/headers_spec.rb
crohr-restfully-0.2.2 spec/http/headers_spec.rb
restfully-0.2.3 spec/http/headers_spec.rb
restfully-0.2.2 spec/http/headers_spec.rb
restfully-0.2.1 spec/http/headers_spec.rb