diff --git a/CHANGELOG.md b/CHANGELOG.md index eb872cbd1..217da6ecb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,15 @@ +11.02.2018 +* BUG: Disable all object validations on domain transfer [#701](https://github.com/internetee/registry/issues/701) + +06.02.2018 +* BUG: EPP sessions get again unique session id preventing session mixups [#699](https://github.com/internetee/registry/pull/699) + +06.02.2018 +* BUG: Poral for registrants returns again domains that is associated with the user only through the role of registrant [#663](https://github.com/internetee/registry/issues/663) +* Registrar: bulk transfer and improved csv download for use as bulk transfer input [#660](https://github.com/internetee/registry/issues/660) +* Improved integration with CodeClimate, Simplecov gem update to 15.1 [#684](https://github.com/internetee/registry/pull/684) +* Improved applycation.yml sample [#664](https://github.com/internetee/registry/pull/664) + 11.12.2017 * BUG: Whitelisted registrar is now automatically chosen on eID/mID login [#609](https://github.com/internetee/registry/issues/609) * BUG: added directo_handle to registrar profile [#343](https://github.com/internetee/registry/issues/343) diff --git a/app/controllers/epp_controller.rb b/app/controllers/epp_controller.rb index 8eb6fbc96..58f450147 100644 --- a/app/controllers/epp_controller.rb +++ b/app/controllers/epp_controller.rb @@ -88,6 +88,7 @@ class EppController < ApplicationController # SESSION MANAGEMENT def epp_session + cookies # Probably does some initialization cookie = env['rack.request.cookie_hash'] || {} EppSession.find_or_initialize_by(session_id: cookie['session']) end diff --git a/app/models/concerns/contact/transferable.rb b/app/models/concerns/contact/transferable.rb index e280adfae..8da98fc57 100644 --- a/app/models/concerns/contact/transferable.rb +++ b/app/models/concerns/contact/transferable.rb @@ -14,7 +14,7 @@ module Concerns::Contact::Transferable new_contact.regenerate_code new_contact.regenerate_auth_info new_contact.remove_address unless self.class.address_processing? - new_contact.save! + new_contact.save(validate: false) new_contact end diff --git a/test/fixtures/contacts.yml b/test/fixtures/contacts.yml index b59d9cba3..2a9898543 100644 --- a/test/fixtures/contacts.yml +++ b/test/fixtures/contacts.yml @@ -30,3 +30,9 @@ acme_ltd: ident_country_code: US code: acme-ltd-001 auth_info: 720b3c + +invalid: + name: any + code: any + auth_info: any + registrar: bestnames diff --git a/test/models/contact/contact_test.rb b/test/models/contact/contact_test.rb index aad044592..c4f26f4a3 100644 --- a/test/models/contact/contact_test.rb +++ b/test/models/contact/contact_test.rb @@ -8,4 +8,8 @@ class ContactTest < ActiveSupport::TestCase def test_validates assert @contact.valid? end + + def test_invalid_fixture_is_invalid + assert contacts(:invalid).invalid? + end end diff --git a/test/models/contact/contact_transfer_test.rb b/test/models/contact/contact_transfer_test.rb index ae5955230..6c403bb23 100644 --- a/test/models/contact/contact_transfer_test.rb +++ b/test/models/contact/contact_transfer_test.rb @@ -48,6 +48,14 @@ class ContactTransferTest < ActiveSupport::TestCase end end + def test_bypasses_validation + @contact = contacts(:invalid) + + assert_difference 'Contact.count' do + @contact.transfer(@new_registrar) + end + end + def test_changes_registrar new_contact = @contact.transfer(@new_registrar) assert_equal @new_registrar, new_contact.registrar