test/test_helper.rb in excon-hypermedia-0.4.1 vs test/test_helper.rb in excon-hypermedia-0.4.2

- old
+ new

@@ -21,10 +21,11 @@ Excon.stub({ method: :get, path: '/product/bicycle' }, response.merge(body: bicycle_body)) Excon.stub({ method: :get, path: '/product/bicycle/wheels/front' }, response.merge(body: front_wheel_body)) Excon.stub({ method: :get, path: '/product/bicycle/wheels/rear' }, response.merge(body: rear_wheel_body)) Excon.stub({ method: :get, path: '/product/pump' }, response.merge(body: pump_body)) Excon.stub({ method: :get, path: '/product/handlebar' }, response.merge(body: handlebar_body)) + Excon.stub({ method: :get, path: '/api_v2.json' }, body: api_body, headers: { 'Content-Type' => 'application/json' }) end def teardown Excon.stubs.clear Excon.defaults[:middlewares].delete(Excon::HyperMedia::Middleware) @@ -90,11 +91,13 @@ def handlebar_body <<~EOF { "_links": { - "self": "https://www.example.org/product/handlebar" + "self": { + "href": "https://www.example.org/product/handlebar" + } }, "material": "Carbon fiber", "reach": "75mm", "bend": "compact" } @@ -103,10 +106,12 @@ def pump_body <<~EOF { "_links": { - "self": "https://www.example.org/product/pump" + "self": { + "href": "https://www.example.org/product/pump" + } }, "weight": "2kg", "type": "Floor Pump", "valve-type": "Presta" }