From ad9a58a17d8f285945c4b1149e83402738da1143 Mon Sep 17 00:00:00 2001 From: Artur Beljajev Date: Thu, 7 Mar 2019 14:49:32 +0200 Subject: [PATCH] Fix fixture Otherwise HTML validation fails --- test/fixtures/registrars.yml | 2 +- .../api/registrant/registrant_api_registry_locks_test.rb | 5 ++++- test/lib/serializers/registrant_api/domain_test.rb | 5 ++++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/test/fixtures/registrars.yml b/test/fixtures/registrars.yml index be7adaa5b..7afaf8edf 100644 --- a/test/fixtures/registrars.yml +++ b/test/fixtures/registrars.yml @@ -11,7 +11,7 @@ bestnames: accounting_customer_code: bestnames language: en billing_email: billing@example.com - website: bestnames.test + website: https://bestnames.test reference_no: 13 goodnames: diff --git a/test/integration/api/registrant/registrant_api_registry_locks_test.rb b/test/integration/api/registrant/registrant_api_registry_locks_test.rb index 6d73f1c64..9c1d7557b 100644 --- a/test/integration/api/registrant/registrant_api_registry_locks_test.rb +++ b/test/integration/api/registrant/registrant_api_registry_locks_test.rb @@ -123,13 +123,16 @@ class RegistrantApiRegistryLocksTest < ApplicationIntegrationTest end def test_locking_domains_returns_serialized_domain_object + assert_equal 'Best Names', @domain.registrar.name + assert_equal 'https://bestnames.test', @domain.registrar.website + post '/api/v1/registrant/domains/1b3ee442-e8fe-4922-9492-8fcb9dccc69c/registry_lock', {}, @auth_headers assert_equal(200, response.status) response_json = JSON.parse(response.body, symbolize_names: true) - assert_equal({ name: 'Best Names', website: 'bestnames.test' }, response_json[:registrar]) + assert_equal({ name: 'Best Names', website: 'https://bestnames.test' }, response_json[:registrar]) assert_equal({name: 'John', id: 'eb2f2766-b44c-4e14-9f16-32ab1a7cb957'}, response_json[:registrant]) assert_equal([{name: 'Jane', id: '9db3de62-2414-4487-bee2-d5c155567768'}], response_json[:admin_contacts]) assert_equal([{name: 'William', id: '0aa54704-d6f7-4ca9-b8ca-2827d9a4e4eb'}, diff --git a/test/lib/serializers/registrant_api/domain_test.rb b/test/lib/serializers/registrant_api/domain_test.rb index 6623a0be2..a592edf45 100644 --- a/test/lib/serializers/registrant_api/domain_test.rb +++ b/test/lib/serializers/registrant_api/domain_test.rb @@ -25,7 +25,10 @@ class SerializersRegistrantApiDomainTest < ActiveSupport::TestCase end def test_returns_registrar_name - assert_equal({name: 'Best Names', website: 'bestnames.test' }, @json[:registrar]) + assert_equal 'Best Names', @domain.registrar.name + assert_equal 'https://bestnames.test', @domain.registrar.website + + assert_equal({name: 'Best Names', website: 'https://bestnames.test' }, @json[:registrar]) end def test_returns_registrant_name_and_uuid