test/test_unit.rb in vacuum-2.1.1 vs test/test_unit.rb in vacuum-2.2.0

- old
+ new

@@ -90,14 +90,17 @@ 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) + def test_handles_authorisation_errors + Excon.stub({}, status: 400) res = @req.item_lookup(query: {}, mock: true) - assert_equal 403, res.status - assert_raises Excon::Error::Forbidden do + assert_equal 400, res.status + assert_raises Excon::Error::BadRequest do @req.item_lookup(query: {}, expects: 200, mock: true) end + Excon.stub({}, status: 403) + res = @req.item_lookup(query: {}, mock: true) + assert_equal 403, res.status end end