summaryrefslogtreecommitdiff
path: root/test/unit/nicknym/source_test.rb
diff options
context:
space:
mode:
authorAzul <azul@riseup.net>2016-09-13 16:45:28 +0200
committerAzul <azul@riseup.net>2016-09-16 12:12:34 +0200
commitf5bf2c6554f0e541c75d90fdcf4f0095e9801d4d (patch)
tree9ec4a4af2a3dcae4beccb3eb2a32856a69529c20 /test/unit/nicknym/source_test.rb
parentec875169b0231d84bb8c55bbe91c52b896561f1e (diff)
test: properly test nicknym source + fixes
Diffstat (limited to 'test/unit/nicknym/source_test.rb')
-rw-r--r--test/unit/nicknym/source_test.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/unit/nicknym/source_test.rb b/test/unit/nicknym/source_test.rb
index 41f5ac0..76337d4 100644
--- a/test/unit/nicknym/source_test.rb
+++ b/test/unit/nicknym/source_test.rb
@@ -9,7 +9,7 @@ class NicknymSourceTest < Minitest::Test
end
def test_available_for_domain
- adapter.expect :get, [200, 'dummy body'],
+ adapter.expect :get, [200, '{"services": ["mx"]}'],
['https://leap_powered.tld/provider.json']
assert source.available_for?('leap_powered.tld')
adapter.verify
@@ -24,7 +24,8 @@ class NicknymSourceTest < Minitest::Test
def test_successful_query
adapter.expect :get, [200, 'dummy body'],
- ['https://nicknym.leap_powered.tld', address: email_stub.to_s]
+ ['https://nicknym.leap_powered.tld:6425',
+ {query: {address: email_stub.to_s}}]
response = source.query(email_stub)
assert_equal 200, response.status
assert_equal 'dummy body', response.content