test/test_vacuum.rb in vacuum-2.0.0 vs test/test_vacuum.rb in vacuum-2.0.1
- old
+ new
@@ -81,15 +81,18 @@
assert_kind_of Hash, res.to_h
end
def test_digs
Excon.stub({}, body: '<foo><bar>baz</bar></foo>')
+ parser = MiniTest::Mock.new
res = @req.item_lookup(query: {}, mock: true)
assert_equal 'baz', res.dig('foo', 'bar')
+ res.parser = parser
+ assert_equal 'baz', res.dig('foo', 'bar')
end
def test_handles_unauthorized_errors
- Excon.stub({}, status: 403, body: '<foo/>')
+ Excon.stub({}, status: 403)
res = @req.item_lookup(query: {}, mock: true)
assert_equal 403, res.status
end
end