diff options
author | Azul <azul@riseup.net> | 2016-12-02 12:24:13 +0100 |
---|---|---|
committer | Azul <azul@riseup.net> | 2016-12-02 12:24:13 +0100 |
commit | 0aa101524270c0c398fe17c287d51927f810e499 (patch) | |
tree | aed9cc67f5711352e86d8314a4718c777a23cc43 /test | |
parent | 65600992f5317ec8889428001313e36629b1e877 (diff) |
debug: raise error on 401
This will get us more debug info in the logs if it happens again
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/couch_db/source_unit_test.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/unit/couch_db/source_unit_test.rb b/test/unit/couch_db/source_unit_test.rb index fd07808..e5a4f43 100644 --- a/test/unit/couch_db/source_unit_test.rb +++ b/test/unit/couch_db/source_unit_test.rb @@ -12,5 +12,16 @@ module Nickserver::CouchDB Source.new(adapter).query address adapter.verify end + + def test_401 + address = "nick@domain.tl" + adapter = Minitest::Mock.new + adapter.expect :get, [401, nil], + [String, {query: { reduce: "false", key: "\"#{address}\"" }}] + assert_raises Error do + Source.new(adapter).query address + end + adapter.verify + end end end |