mirror of
https://github.com/internetee/registry.git
synced 2025-06-11 07:04:47 +02:00
Merge branch 'master' into refactor-messages
# Conflicts: # app/views/epp/poll/poll_req.xml.builder # test/fixtures/messages.yml # test/integration/epp/poll_test.rb
This commit is contained in:
commit
1679e4b72e
8 changed files with 55 additions and 7 deletions
26
CHANGELOG.md
26
CHANGELOG.md
|
@ -1,3 +1,29 @@
|
|||
12.09.2018
|
||||
* Bug: user with billing access only can now login to the portal for Regsitrars [#973](https://github.com/internetee/registry/issues/973)
|
||||
|
||||
06.09.2018
|
||||
* Bug: registrant confirmation does not require authentication any more [#969](https://github.com/internetee/registry/issues/969)
|
||||
* Whois JSON tests order independent [#965](https://github.com/internetee/registry/issues/965)
|
||||
|
||||
04.09.2018
|
||||
* New registrant portal API [#902](https://github.com/internetee/registry/issues/902)
|
||||
* Registry lock in Registrant API [#927](https://github.com/internetee/registry/issues/927)
|
||||
* Password encryption for EPP [#914](https://github.com/internetee/registry/issues/914)
|
||||
* Registrar: 0 amount invoices invalidated [#651](https://github.com/internetee/registry/issues/651)
|
||||
* Ruby upgrade to 2.4 [#938](https://github.com/internetee/registry/issues/938)
|
||||
* Admin: removig deleteCandidate status removes Que job as well [#790](https://github.com/internetee/registry/issues/790)
|
||||
* Admin: Cancel force delete no possible with deleteCandidate status set [#791](https://github.com/internetee/registry/issues/791)
|
||||
* Contact tests added [#930](https://github.com/internetee/registry/issues/930)
|
||||
* Change test structure [#924](https://github.com/internetee/registry/issues/924)
|
||||
* Grape gem update to 1.1.0 (CVE-2018-3769) [#934](https://github.com/internetee/registry/pull/934)
|
||||
* Remove changelog from codeclimate analysis [#961](https://github.com/internetee/registry/issues/961)
|
||||
* Remove dead code [#925](https://github.com/internetee/registry/issues/925)
|
||||
* Quote value in fixture [#937](https://github.com/internetee/registry/issues/937)
|
||||
* Generate <body> CSS class for every action [#939](https://github.com/internetee/registry/issues/939)
|
||||
* Add TaskTestCase [#941](https://github.com/internetee/registry/issues/941)
|
||||
* Set NOT NULL constraint for contact.email field [#936](https://github.com/internetee/registry/issues/936)
|
||||
* Remove duplicate fixture [#946](https://github.com/internetee/registry/issues/946)
|
||||
|
||||
26.07.2018
|
||||
* Grape (1.0.3), mustermann (1.0.2), multi_json (1.13.1) gem updates [#912](https://github.com/internetee/registry/issues/912)
|
||||
* Capybara (3.3.1), mini_mime (0.1.3), nokogiri (1.8), rack (1.6.0), xpath (3.1) gem updates [#980](https://github.com/internetee/registry/issues/908)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
class Registrant::DomainDeleteConfirmsController < RegistrantController
|
||||
skip_before_action :authenticate_user!, only: [:show, :update]
|
||||
skip_before_action :authenticate_registrant_user!, only: [:show, :update]
|
||||
skip_authorization_check only: [:show, :update]
|
||||
|
||||
def show
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
class Registrant::DomainUpdateConfirmsController < RegistrantController
|
||||
skip_before_action :authenticate_user!, only: %i[show update]
|
||||
skip_before_action :authenticate_registrant_user!, only: %i[show update]
|
||||
skip_authorization_check only: %i[show update]
|
||||
|
||||
def show
|
||||
|
|
|
@ -115,7 +115,7 @@ class Registrar
|
|||
sign_in(:registrar_user, @user)
|
||||
flash[:notice] = t(:welcome)
|
||||
flash.keep(:notice)
|
||||
render js: "window.location = '#{registrar_root_url}'"
|
||||
render js: "window.location = '#{after_sign_in_path_for(@user)}'"
|
||||
when 'NOT_VALID'
|
||||
render json: { message: t(:user_signature_is_invalid) }, status: :bad_request
|
||||
when 'EXPIRED_TRANSACTION'
|
||||
|
|
|
@ -5,7 +5,7 @@ xml.epp_head do
|
|||
end
|
||||
|
||||
xml.tag!('msgQ', 'count' => current_user.unread_notifications.count, 'id' => @notification.id) do
|
||||
xml.qDate @notification.created_at.try(:iso8601)
|
||||
xml.qDate @notification.created_at.utc.xmlschema
|
||||
xml.msg @notification.text
|
||||
end
|
||||
|
||||
|
|
2
test/fixtures/notifications.yml
vendored
2
test/fixtures/notifications.yml
vendored
|
@ -7,7 +7,7 @@ domain_deleted:
|
|||
text: Your domain has been deleted
|
||||
read: false
|
||||
registrar: bestnames
|
||||
created_at: <%= Time.zone.parse('2010-07-05').to_s(:db) %>
|
||||
created_at: <%= Time.zone.parse('2010-07-05') %>
|
||||
|
||||
farewell:
|
||||
text: Good bye!
|
||||
|
|
|
@ -1,10 +1,29 @@
|
|||
require 'test_helper'
|
||||
|
||||
class EppPollTest < ApplicationIntegrationTest
|
||||
# Deliberately does not conform to RFC5730, which requires the first message to be returned
|
||||
# Deliberately does not conform to RFC5730, which requires the first notification to be returned
|
||||
def test_return_latest_notification_when_queue_is_not_empty
|
||||
notification = notifications(:domain_deleted)
|
||||
|
||||
request_xml = <<-XML
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<epp xmlns="https://epp.tld.ee/schema/epp-ee-1.0.xsd">
|
||||
<command>
|
||||
<poll op="req"/>
|
||||
</command>
|
||||
</epp>
|
||||
XML
|
||||
post '/epp/command/poll', { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames'
|
||||
response_xml = Nokogiri::XML(response.body)
|
||||
|
||||
assert_equal 1301.to_s, response_xml.at_css('result')[:code]
|
||||
assert_equal 1, response_xml.css('result').size
|
||||
assert_equal 2.to_s, response_xml.at_css('msgQ')[:count]
|
||||
assert_equal notification.id.to_s, response_xml.at_css('msgQ')[:id]
|
||||
assert_equal Time.zone.parse('2010-07-05').utc.xmlschema, response_xml.at_css('msgQ qDate').text
|
||||
assert_equal 'Your domain has been deleted', response_xml.at_css('msgQ msg').text
|
||||
end
|
||||
|
||||
request_xml = <<-XML
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<epp xmlns="https://epp.tld.ee/schema/epp-ee-1.0.xsd">
|
||||
|
|
|
@ -22,7 +22,6 @@ class WhoisRecordTest < ActiveSupport::TestCase
|
|||
registrant_kind: 'priv',
|
||||
email: 'john@inbox.test',
|
||||
expire: '2010-07-05',
|
||||
nameservers: ['ns1.bestnames.test', 'ns2.bestnames.test'],
|
||||
registrar_address: 'Main Street, New York, New York, 12345',
|
||||
dnssec_keys: [],
|
||||
}
|
||||
|
@ -30,6 +29,10 @@ class WhoisRecordTest < ActiveSupport::TestCase
|
|||
expected_partial_hash.each do |key, value|
|
||||
assert_equal(value, @record.generated_json[key])
|
||||
end
|
||||
|
||||
['ns1.bestnames.test', 'ns2.bestnames.test'].each do |item|
|
||||
assert(@record.generated_json[:nameservers].include?(item))
|
||||
end
|
||||
end
|
||||
|
||||
def test_generated_body_has_justified_disclaimer
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue