Merge branch 'master' into registry-661

This commit is contained in:
Artur Beljajev 2018-02-20 03:59:57 +02:00
commit 8b46d1ab25
6 changed files with 32 additions and 1 deletions

View file

@ -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)

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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