mirror of
https://github.com/internetee/registry.git
synced 2025-08-01 23:42:04 +02:00
Add some feature tests
This commit is contained in:
parent
a72560c3d3
commit
4c4c65d431
7 changed files with 70 additions and 8 deletions
|
@ -3,13 +3,10 @@ class Admin::NameserversController < ApplicationController
|
|||
before_action :set_nameserver, only: [:edit, :update, :destroy]
|
||||
|
||||
def new
|
||||
@domain = Domain.find(params[:domain_id])
|
||||
@nameserver = @domain.nameservers.build
|
||||
end
|
||||
|
||||
def create
|
||||
@domain = Domain.find(params[:domain_id])
|
||||
|
||||
unless @domain.can_add_nameserver?
|
||||
@nameserver = @domain.nameservers.build(nameserver_params)
|
||||
flash.now[:alert] = I18n.t('shared.failed_to_add_nameserver')
|
||||
|
@ -28,7 +25,6 @@ class Admin::NameserversController < ApplicationController
|
|||
end
|
||||
|
||||
def edit
|
||||
@domain = Domain.find(params[:domain_id])
|
||||
@nameserver = Nameserver.find(params[:id])
|
||||
end
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
- panel_class = @domain.errors.messages[:nameservers] ? 'panel-danger' : 'panel-default'
|
||||
.panel{class: panel_class}
|
||||
#nameservers.panel{class: panel_class}
|
||||
.panel-heading.clearfix
|
||||
.pull-left
|
||||
= t('shared.nameservers')
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
- panel_class = @domain.errors.messages[:domain_statuses] ? 'panel-danger' : 'panel-default'
|
||||
.panel{class: panel_class}
|
||||
#domain_statuses.panel{class: panel_class}
|
||||
.panel-heading.clearfix
|
||||
.pull-left
|
||||
= t('shared.statuses')
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
- panel_class = @domain.errors.messages[:tech_contacts] ? 'panel-danger' : 'panel-default'
|
||||
.panel{class: panel_class}
|
||||
#tech_contacts.panel{class: panel_class}
|
||||
.panel-heading.clearfix
|
||||
.pull-left
|
||||
= t('shared.tech_contacts')
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
.col-md-12
|
||||
.form-group.has-feedback
|
||||
.form-group.has-feedback
|
||||
= label_tag :tech_contact
|
||||
= label_tag :domain_contact, t('shared.tech_contact')
|
||||
= text_field_tag(:domain_contact, params[:domain_contact], class: 'form-control js-contact-typeahead', placeholder: t('shared.contact_code'), autocomplete: 'off')
|
||||
%span.glyphicon.glyphicon-ok.form-control-feedback.js-typeahead-ok.hidden
|
||||
%span.glyphicon.glyphicon-remove.form-control-feedback.js-typeahead-remove
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue