summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/nickserver/reel_server.rb2
-rw-r--r--test/functional/sample_test.rb6
-rw-r--r--test/support/http_stub_helper.rb3
3 files changed, 5 insertions, 6 deletions
diff --git a/lib/nickserver/reel_server.rb b/lib/nickserver/reel_server.rb
index 9626466..db38e50 100644
--- a/lib/nickserver/reel_server.rb
+++ b/lib/nickserver/reel_server.rb
@@ -43,7 +43,7 @@ module Nickserver
handler.respond_to params(request), request.headers
end
end
- rescue StandardError => e
+ rescue StandardError
request.respond 500, "{}"
end
diff --git a/test/functional/sample_test.rb b/test/functional/sample_test.rb
index 18fad74..2b49527 100644
--- a/test/functional/sample_test.rb
+++ b/test/functional/sample_test.rb
@@ -18,19 +18,19 @@ class SampleTest < FunctionalTest
# assert_lookup_status 400, 'invalid'
# end
- def test_nicknym
+ def test_nicknym_success
assert_lookup_status 200, 'test@mail.bitmask.net'
end
# Regression Tests
# #3 handle missing A records
- def test_nicknym
+ def test_nicknym_handles_missing_a_record
assert_lookup_status 404, 'postmaster@cs.ucl.ac.uk'
end
# platform/#8674 handle nonexisting domains
- def test_nicknym
+ def test_nicknym_handles_missing_domain
assert_lookup_status 404, 'postmaster@now-dont-you-dare-register-this-domain.coop'
end
diff --git a/test/support/http_stub_helper.rb b/test/support/http_stub_helper.rb
index 4e3d89b..cc9196e 100644
--- a/test/support/http_stub_helper.rb
+++ b/test/support/http_stub_helper.rb
@@ -27,8 +27,7 @@ module HttpStubHelper
def stub_couch_response(uid, response = {})
query = "\?key=#{"%22#{uid}%22"}&reduce=false"
- stub_http_get /#{Regexp.escape(config.couch_url)}.*#{query}/,
- response
+ stub_http_get(/#{Regexp.escape(config.couch_url)}.*#{query}/, response)
end
private