spec/motion/http_spec.rb in bubble-wrap-1.1.3 vs spec/motion/http_spec.rb in bubble-wrap-1.1.4

- old
+ new

@@ -73,10 +73,14 @@ [100..101, 300..307, 400..417, 500..505].inject([]){|codes, rg| codes += rg.to_a}.each do |code| BubbleWrap::HTTP::Response.new(status_code: code).ok?.should.be.false end end + it "updates the status description" do + @response.status_description.should.equal 'no error' + end + it "updates ivars when calling update" do @response.update(one: 'one', two: 'two') @response.instance_variable_get(:@one).should.equal 'one' @response.instance_variable_get(:@two).should.equal 'two' @@ -139,9 +143,18 @@ @query.should.respond_to :response @query.should.respond_to :status_code @query.should.respond_to :response_headers @query.should.respond_to :response_size @query.should.respond_to :options + end + + it "should accept nil header value" do + @headers = { 'Authorization' => nil, 'User-Agent' => "Mozilla/5.0 (X11; Linux x86_64; rv:12.0) \n Gecko/20100101 Firefox/12.0" } + @options = { + headers: @headers, + } + @query = BubbleWrap::HTTP::Query.new( @localhost_url , :get, @options ) + @query.should.not.be.nil end describe "When initialized" do it "should upcase the HTTP method" do