Validate origin domains #2849

This commit is contained in:
Martin Lensment 2015-08-25 16:33:47 +03:00
parent 71b2763df6
commit 5ba39fb406
23 changed files with 99 additions and 24 deletions

View file

@ -2,6 +2,8 @@ require 'rails_helper'
feature 'Domains', type: :feature do
before :all do
Fabricate(:zonefile_setting, origin: 'ee')
Fabricate(:zonefile_setting, origin: 'pri.ee')
@user = Fabricate(:api_user)
end
@ -58,7 +60,9 @@ feature 'Domains', type: :feature do
it 'should search domains' do
# having shared state across tests is really annoying sometimes...
click_link "#{@user} (#{@user.roles.first}) - #{@user.registrar}"
within('.dropdown-menu') do
click_link "#{@user} (#{@user.roles.first}) - #{@user.registrar}"
end
Fabricate(:domain, name: 'abcde.ee', registrar: @user.registrar)
Fabricate(:domain, name: 'abcdee.ee', registrar: @user.registrar)