From 65c50fdbdb781006f514997491b7a7b16ea24ca9 Mon Sep 17 00:00:00 2001 From: Artur Beljajev Date: Mon, 21 May 2018 07:06:00 +0300 Subject: [PATCH] Fix test names #37 --- test/integration/whois_records/html_test.rb | 10 +++++----- test/integration/whois_records/json_test.rb | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/test/integration/whois_records/html_test.rb b/test/integration/whois_records/html_test.rb index 1a389e9a..9d254f43 100644 --- a/test/integration/whois_records/html_test.rb +++ b/test/integration/whois_records/html_test.rb @@ -1,7 +1,7 @@ require 'test_helper' class PrivatePersonWhoisRecordHTMLTest < ActionDispatch::IntegrationTest - def test_HTML_returns_404_for_missing_domains + def test_html_returns_404_for_missing_domains visit('/v1/missing-domain.test') assert_equal(404, page.status_code) @@ -24,7 +24,7 @@ def test_returns_minimal_html ) end - def test_HTML_has_disclaimer_text + def test_html_has_disclaimer_text visit('/v1/privatedomain.test') assert_text( @@ -42,7 +42,7 @@ def test_HTML_has_disclaimer_text ) end - def test_HTML_for_private_person_does_not_contain_personal_data + def test_html_for_private_person_does_not_contain_personal_data visit('/v1/privatedomain.test') assert_text( <<-TEXT.squish @@ -65,7 +65,7 @@ def test_HTML_for_private_person_does_not_contain_personal_data ) end - def test_HTML_for_company_with_failed_captcha + def test_html_for_company_with_failed_captcha # Setup Recaptcha.configuration.skip_verify_env.delete("test") headers = page.driver.options[:headers] @@ -115,7 +115,7 @@ def test_HTML_for_company_with_failed_captcha Recaptcha.configuration.skip_verify_env = ['test', 'cucumber'] end - def test_HTML_for_company_with_whitelist_IP + def test_html_for_company_with_whitelist_ip visit('/v1/company-domain.test') assert_text( diff --git a/test/integration/whois_records/json_test.rb b/test/integration/whois_records/json_test.rb index 7974e322..1428398f 100644 --- a/test/integration/whois_records/json_test.rb +++ b/test/integration/whois_records/json_test.rb @@ -3,7 +3,7 @@ class WhoisRecordJsonTest < ActionDispatch::IntegrationTest # By default, all requests are done from 127.0.0.1, which is inside the # whitelist - def test_JSON_does_not_include_disclosed_field_when_not_on_whitelist + def test_json_does_not_include_disclosed_field_when_not_on_whitelist get('/v1/company-domain.test.json', {}, { 'REMOTE_ADDR': '1.2.3.4' }) response_json = JSON.parse(response.body) @@ -20,7 +20,7 @@ def test_json_returns_404_for_missing_domains assert_equal('missing-domain.test', response_json['name']) end - def test_POST_requests_works_as_get + def test_post_requests_works_as_get post('/v1/missing-domain.test.json') assert_equal(404, response.status) @@ -47,7 +47,7 @@ def test_discarded_returns_minimal_json refute(response_json.has_key?('registrant')) end - def test_JSON_does_not_include_private_person_contact_data + def test_json_does_not_include_private_person_contact_data get('/v1/privatedomain.test.json') response_json = JSON.parse(response.body) @@ -56,7 +56,7 @@ def test_JSON_does_not_include_private_person_contact_data assert_equal('Private Person', response_json['registrant']) end - def test_JSON_includes_legal_person_contacts_data + def test_json_includes_legal_person_contacts_data get('/v1/company-domain.test.json') response_json = JSON.parse(response.body) @@ -80,7 +80,7 @@ def test_JSON_includes_legal_person_contacts_data assert_equal(expected_tech_contacts, response_json['tech_contacts']) end - def test_JSON_all_fields_are_present + def test_json_all_fields_are_present expected_response = { 'admin_contacts': [{'changed': 'Not Disclosed', 'email': 'Not Disclosed',