Skip to content

Commit

Permalink
Fix bulk NS change IP validation
Browse files Browse the repository at this point in the history
  • Loading branch information
karlerikounapuu committed Feb 18, 2021
1 parent e71ea05 commit 082d287
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions app/controllers/repp/v1/registrar/nameservers_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ class NameserversController < BaseController
'nameserver replacement'
param :attributes, Hash, required: true, desc: 'Object holding new nameserver values' do
param :hostname, String, required: true, desc: 'New hostname of nameserver'
param :ipv4, Array, required: false, desc: 'Array of fixed IPv4 addresses'
param :ipv6, Array, required: false, desc: 'Array of fixed IPv6 addresses'
param :ipv4, Array, of: String, required: false, desc: 'Array of fixed IPv4 addresses'
param :ipv6, Array, of: String, required: false, desc: 'Array of fixed IPv6 addresses'
end
end
def update
Expand Down
4 changes: 2 additions & 2 deletions test/integration/repp/v1/registrar/nameservers_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def test_ipv4_isnt_array

assert_response :bad_request
assert_equal 2005, json[:code]
assert_equal 'IPv4 should be array [ipv4]', json[:message]
assert json[:message].include? 'Must be an array of String'
end

def test_ipv6_isnt_array
Expand All @@ -118,7 +118,7 @@ def test_ipv6_isnt_array

assert_response :bad_request
assert_equal 2005, json[:code]
assert_equal 'IPv6 should be array [ipv6]', json[:message]
assert json[:message].include? 'Must be an array of String'
end

def test_bulk_nameservers_change_in_array_of_domains
Expand Down

0 comments on commit 082d287

Please sign in to comment.