test/env_test.rb in faraday-0.2.2 vs test/env_test.rb in faraday-0.2.3

- old
+ new

@@ -1,11 +1,11 @@ require File.expand_path(File.join(File.dirname(__FILE__), 'helper')) class TestEnv < Faraday::TestCase describe "Request#create" do before :all do - @conn = Faraday::Connection.new :url => 'http://sushi.com/api' + @conn = Faraday::Connection.new :url => 'http://sushi.com/api', :headers => {'Mime-Version' => '1.0'} @input = { :body => 'abc', :headers => {'Server' => 'Faraday'}} @env_setup = Faraday::Request.create do |req| req.url 'foo.json', 'a' => 1 @@ -23,10 +23,10 @@ assert_equal 'http://sushi.com/api/foo.json?a=1', @env[:url].to_s end it "stores headers in :headers" do assert_kind_of Rack::Utils::HeaderHash, @env[:request_headers] - assert_equal @input[:headers], @env[:request_headers] + assert_equal @input[:headers].merge('Mime-Version' => '1.0'), @env[:request_headers] end it "stores body in :body" do assert_equal @input[:body], @env[:body] end \ No newline at end of file