Fail registrar nameserver change gracefully

#661
This commit is contained in:
Artur Beljajev 2018-02-26 11:35:13 +02:00
parent 0cdbd891cc
commit 2aa28c8673
2 changed files with 12 additions and 4 deletions

View file

@ -5,7 +5,7 @@
</div>
<div class="col-md-5">
<%= text_field_tag :old_hostname, nil, autofocus: true, required: true,
<%= text_field_tag :old_hostname, params[:old_hostname], autofocus: true, required: true,
class: 'form-control' %>
</div>
</div>
@ -16,7 +16,7 @@
</div>
<div class="col-md-5">
<%= text_field_tag :new_hostname, nil, required: true, class: 'form-control' %>
<%= text_field_tag :new_hostname, params[:new_hostname], required: true, class: 'form-control' %>
</div>
</div>
@ -26,7 +26,7 @@
</div>
<div class="col-md-3">
<%= text_area_tag :ipv4, nil, class: 'form-control' %>
<%= text_area_tag :ipv4, params[:ipv4], class: 'form-control' %>
</div>
</div>
@ -36,7 +36,7 @@
</div>
<div class="col-md-3">
<%= text_area_tag :ipv6, nil, class: 'form-control' %>
<%= text_area_tag :ipv6, params[:ipv6], class: 'form-control' %>
</div>
</div>

View file

@ -42,8 +42,16 @@ class RegistrarNameserverReplacementTest < ActionDispatch::IntegrationTest
visit registrar_domains_url
click_link 'Replace nameserver'
fill_in 'Old hostname', with: 'old hostname'
fill_in 'New hostname', with: 'new hostname'
fill_in 'ipv4', with: 'ipv4'
fill_in 'ipv6', with: 'ipv6'
click_on 'Replace nameserver'
assert_text 'epic fail'
assert_field 'Old hostname', with: 'old hostname'
assert_field 'New hostname', with: 'new hostname'
assert_field 'ipv4', with: 'ipv4'
assert_field 'ipv6', with: 'ipv6'
end
end