test/excon/hcp_test.rb in excon-hypermedia-0.5.3 vs test/excon/hcp_test.rb in excon-hypermedia-0.6.0
- old
+ new
@@ -11,11 +11,11 @@
def response
bicycle
end
def test_non_hcp_response
- assert_equal nil, response[:hcp]
+ assert_nil response[:hcp]
end
def test_hcp_response
assert response.rel('pump', hcp: true).get[:hcp]
end
@@ -25,22 +25,22 @@
end
def test_hcp_response_with_missing_embedding
response = api.rel('product', expand: { uid: 'bicycle' }, hcp: true).get
- assert_equal nil, response[:hcp]
+ assert_nil response[:hcp]
end
def test_hcp_response_with_embedding_but_missing_embed_for_request
handlebar = response.rel('handlebar', hcp: true).get
- assert_equal nil, handlebar[:hcp]
+ assert_nil handlebar[:hcp]
end
def test_hcp_response_with_embedded_array
wheels = response.rel('wheels', hcp: true)
- assert wheels.map(&:get).all? { |res| res[:hcp] }
+ assert(wheels.map(&:get).all? { |res| res[:hcp] })
end
def test_nested_hcp_responses
pump = response.rel('pump', hcp: true).get
response = pump.rel('parts', expand: { uid: 'bicycle' }).get