mirror of
https://github.com/internetee/registry.git
synced 2025-07-28 05:26:17 +02:00
Modified white ip form and created mailer
This commit is contained in:
parent
311834c085
commit
e00e44c9b8
10 changed files with 83 additions and 21 deletions
|
@ -48,22 +48,6 @@ class ReppV1WhiteIpsCreateTest < ActionDispatch::IntegrationTest
|
|||
assert json[:message].include? 'IP address limit exceeded'
|
||||
end
|
||||
|
||||
def test_validates_ip_uniqueness_per_registrar
|
||||
white_ip = white_ips(:one)
|
||||
request_body = {
|
||||
white_ip: {
|
||||
address: white_ip.ipv4,
|
||||
interfaces: ['API'],
|
||||
},
|
||||
}
|
||||
|
||||
post '/repp/v1/white_ips', headers: @auth_headers, params: request_body
|
||||
json = JSON.parse(response.body, symbolize_names: true)
|
||||
|
||||
assert_response :bad_request
|
||||
assert json[:message].include? 'IPv4 has already been taken'
|
||||
end
|
||||
|
||||
def test_returns_error_response_if_throttled
|
||||
ENV['shunter_default_threshold'] = '1'
|
||||
ENV['shunter_enabled'] = 'true'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue