spec/caching_test.rb in faraday_middleware-0.8.5 vs spec/caching_test.rb in faraday_middleware-0.8.6
- old
+ new
@@ -115,13 +115,20 @@
extend Forwardable
def_delegators :@conn, :get, :post
def test_cache_get
- assert_equal 'request:1', get('/', :user_agent => 'test').body
response = get('/', :user_agent => 'test')
assert_equal 'request:1', response.body
+ assert_equal :get, response.env[:method]
+ assert_equal 200, response.status
+
+ response = get('/', :user_agent => 'test')
+ assert_equal 'request:1', response.body
assert_equal 'text/plain', response['content-type']
+ assert_equal :get, response.env[:method]
+ assert response.env[:request].respond_to?(:fetch)
+ assert_equal 200, response.status
assert_equal 'request:2', post('/').body
end
def test_doesnt_cache_post