diff options
Diffstat (limited to 'test/unit/nickserver_test.rb')
-rw-r--r-- | test/unit/nickserver_test.rb | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/test/unit/nickserver_test.rb b/test/unit/nickserver_test.rb index c74d3d8..65ade8c 100644 --- a/test/unit/nickserver_test.rb +++ b/test/unit/nickserver_test.rb @@ -19,11 +19,11 @@ class NickserverTest < Minitest::Test def test_GET_served_via_SKS uid = 'cloudadmin@leap.se' key_id = 'E818C478D3141282F7590D29D041EB11B1647490' - stub_sks_vindex_reponse(uid, :body => file_content(:leap_vindex_result)) - stub_sks_get_reponse(key_id, :body => file_content(:leap_public_key)) + stub_sks_vindex_reponse(uid, body: file_content(:leap_vindex_result)) + stub_sks_get_reponse(key_id, body: file_content(:leap_public_key)) start do - params = {:query => {"address" => uid}} + params = {query: {"address" => uid}} get(params) do |http| assert_equal file_content(:leap_public_key), JSON.parse(http.response)["openpgp"] stop @@ -34,11 +34,11 @@ class NickserverTest < Minitest::Test def test_POST_served_via_SKS uid = 'cloudadmin@leap.se' key_id = 'E818C478D3141282F7590D29D041EB11B1647490' - stub_sks_vindex_reponse(uid, :body => file_content(:leap_vindex_result)) - stub_sks_get_reponse(key_id, :body => file_content(:leap_public_key)) + stub_sks_vindex_reponse(uid, body: file_content(:leap_vindex_result)) + stub_sks_get_reponse(key_id, body: file_content(:leap_public_key)) start do - params = {:body => {"address" => uid}} + params = {body: {"address" => uid}} post(params) do |http| assert_equal file_content(:leap_public_key), JSON.parse(http.response)["openpgp"] stop @@ -49,9 +49,9 @@ class NickserverTest < Minitest::Test def test_GET_served_via_couch_not_found domain = "example.org" uid = "bananas@" + domain - stub_couch_response(uid, :status => 404) do + stub_couch_response(uid, status: 404) do start do - params = {:query => {"address" => uid}, :head => {:host => domain}} + params = {query: {"address" => uid}, head: {host: domain}} get(params) do |http| assert_equal 404, http.response_header.status stop @@ -63,9 +63,9 @@ class NickserverTest < Minitest::Test def test_GET_served_via_couch_empty_results domain = "example.org" uid = "stompy@" + domain - stub_couch_response(uid, :body => file_content(:empty_couchdb_result)) do + stub_couch_response(uid, body: file_content(:empty_couchdb_result)) do start do - params = {:query => {"address" => uid}, :head => {:host => domain}} + params = {query: {"address" => uid}, head: {host: domain}} get(params) do |http| assert_equal 404, http.response_header.status stop @@ -77,9 +77,9 @@ class NickserverTest < Minitest::Test def test_GET_served_via_couch_success domain = "example.org" uid = "blue@" + domain - stub_couch_response(uid, :body => file_content(:blue_couchdb_result)) do + stub_couch_response(uid, body: file_content(:blue_couchdb_result)) do start do - params = {:query => {"address" => uid}, :head => {:host => domain}} + params = {query: {"address" => uid}, head: {host: domain}} get(params) do |http| assert_equal file_content(:blue_nickserver_result), http.response stop |