mirror of
https://github.com/internetee/registry.git
synced 2025-05-18 18:29:40 +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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue