diff options
author | Azul <azul@riseup.net> | 2016-07-02 12:03:46 +0200 |
---|---|---|
committer | Azul <azul@riseup.net> | 2016-07-02 12:03:46 +0200 |
commit | fb2d7e6f8f1fceefbc8964d34369a867eb8f25bb (patch) | |
tree | 672ea8bbf03876d65c90ecb1ed152424e74939e1 /test/unit/couch_db | |
parent | 8a664a39bc3dd77a9c53fa5931f81c2b2b8b7295 (diff) |
refactor: replace blocks/yields with returns
This became possible because we now use celluloid.
Celluloid handles asynchronity without the need for callbacks
or blocks.
Diffstat (limited to 'test/unit/couch_db')
-rw-r--r-- | test/unit/couch_db/source_unit_test.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/test/unit/couch_db/source_unit_test.rb b/test/unit/couch_db/source_unit_test.rb index 19ea9bc..fd07808 100644 --- a/test/unit/couch_db/source_unit_test.rb +++ b/test/unit/couch_db/source_unit_test.rb @@ -7,10 +7,9 @@ module Nickserver::CouchDB def test_query address = "nick@domain.tl" adapter = Minitest::Mock.new - adapter.expect :get, nil, + adapter.expect :get, [200, nil], [String, {query: { reduce: "false", key: "\"#{address}\"" }}] - query = Source.new(adapter) - query.query address + Source.new(adapter).query address adapter.verify end end |