diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/sample_test.rb | 1 | ||||
-rw-r--r-- | test/remote/wkd_source_test.rb | 6 | ||||
-rw-r--r-- | test/support/http_stub_helper.rb | 12 |
3 files changed, 10 insertions, 9 deletions
diff --git a/test/functional/sample_test.rb b/test/functional/sample_test.rb index dbd8796..412555e 100644 --- a/test/functional/sample_test.rb +++ b/test/functional/sample_test.rb @@ -1,3 +1,4 @@ +require 'English' require 'support/functional_test' class SampleTest < FunctionalTest diff --git a/test/remote/wkd_source_test.rb b/test/remote/wkd_source_test.rb index 7eaab79..1ed7ea5 100644 --- a/test/remote/wkd_source_test.rb +++ b/test/remote/wkd_source_test.rb @@ -27,14 +27,14 @@ class RemoteWkdSourceTest < CelluloidTest def assert_pgp_key_in(response) json = JSON.parse response.content - assert_equal email_with_key.to_s, json['address'] - refute_empty json['openpgp'] + assert_equal email_with_key.to_s, json["address"] + refute_empty json["openpgp"] assert_equal file_content('dewey.pgp.asc'), json['openpgp'] end def email_with_key uid = 'dewey@test.gnupg.org' - email = Nickserver::EmailAddress.new uid + Nickserver::EmailAddress.new uid end def source diff --git a/test/support/http_stub_helper.rb b/test/support/http_stub_helper.rb index ee50698..b0ec069 100644 --- a/test/support/http_stub_helper.rb +++ b/test/support/http_stub_helper.rb @@ -16,13 +16,13 @@ module HttpStubHelper Hash end - def stub_sks_vindex_reponse(_uid, response = {}) + def stub_sks_vindex_reponse(uid, response = {}) stub_http_get config.hkp_url, response, - query: vindex_query + query: vindex_query(uid) end - def vindex_query + def vindex_query(uid) { op: 'vindex', search: uid, exact: 'on', @@ -30,13 +30,13 @@ module HttpStubHelper fingerprint: 'on' } end - def stub_sks_get_reponse(_key_id, response = {}) + def stub_sks_get_reponse(key_id, response = {}) stub_http_get config.hkp_url, response, - query: sks_get_query + query: sks_get_query(key_id) end - def sks_get_query + def sks_get_query(key_id) { op: 'get', search: '0x' + key_id, exact: 'on', |