test/test_vacuum.rb in vacuum-1.5.0 vs test/test_vacuum.rb in vacuum-2.0.0

- old
+ new

@@ -78,6 +78,18 @@ res = @req.item_lookup(query: {}, mock: true) assert_kind_of Hash, res.to_h res.parser = parser assert_kind_of Hash, res.to_h end + + def test_digs + Excon.stub({}, body: '<foo><bar>baz</bar></foo>') + res = @req.item_lookup(query: {}, mock: true) + assert_equal 'baz', res.dig('foo', 'bar') + end + + def test_handles_unauthorized_errors + Excon.stub({}, status: 403, body: '<foo/>') + res = @req.item_lookup(query: {}, mock: true) + assert_equal 403, res.status + end end