diff options
author | Azul <azul@riseup.net> | 2016-08-30 12:38:43 +0200 |
---|---|---|
committer | Azul <azul@riseup.net> | 2016-08-31 12:14:52 +0200 |
commit | 625416ac16a1216240fc4c48aa19802ef8a967a1 (patch) | |
tree | f3a4a54627fcae49bf896f5f58e60b506f9a55d4 /test/unit/adapters | |
parent | b22e23eb9f5a1cb3e37ab2a26b1091183574f4e4 (diff) |
wip: key lookup by address via leaps nicknym
I added a RequestHandler that uses Nicknym::Source - but that has not
been implemented yet.
Diffstat (limited to 'test/unit/adapters')
-rw-r--r-- | test/unit/adapters/celluloid_http_test.rb | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/test/unit/adapters/celluloid_http_test.rb b/test/unit/adapters/celluloid_http_test.rb index 4381b8f..68b9606 100644 --- a/test/unit/adapters/celluloid_http_test.rb +++ b/test/unit/adapters/celluloid_http_test.rb @@ -13,7 +13,16 @@ class Nickserver::Adapters::CelluloidHttpTest < Minitest::Test super end - def test_successful_request + def test_request_without_query + url = 'http://url.to' + stub_http_request(:get, url) + .to_return status: 200, body: 'body' + status, body = adapter.get url + assert_equal 200, status + assert_equal 'body', body + end + + def test_successful_request_with_query url = 'http://url.to' stub_http_request(:get, url) .with(query: {key: :value}) |