test/excon/hcp_test.rb in excon-hypermedia-0.5.1 vs test/excon/hcp_test.rb in excon-hypermedia-0.5.2
- old
+ new
@@ -18,12 +18,16 @@
def test_hcp_response
assert response.rel('pump', hcp: true).get[:hcp]
end
+ def test_hcp_response_without_existing_response
+ assert Excon.get('https://example.org/product/bicycle', hcp: true)
+ end
+
def test_hcp_response_with_missing_embedding
api = Excon.get('https://www.example.org/api.json')
- response = api.rel('product', expand: { uid: 'bicycle' }, rel: true).get
+ response = api.rel('product', expand: { uid: 'bicycle' }, hcp: true).get
assert_equal nil, response[:hcp]
end
def test_hcp_response_with_embedded_array