mirror of
https://github.com/internetee/registry.git
synced 2025-07-22 18:56:05 +02:00
Add reserved domains feature test #2565
This commit is contained in:
parent
bf2c0c6bb7
commit
d99c001722
1 changed files with 29 additions and 0 deletions
29
spec/features/admin/reserved_domain_spec.rb
Normal file
29
spec/features/admin/reserved_domain_spec.rb
Normal file
|
@ -0,0 +1,29 @@
|
|||
require 'rails_helper'
|
||||
|
||||
feature 'ReservedDomain', type: :feature do
|
||||
before :all do
|
||||
@user = Fabricate(:admin_user)
|
||||
end
|
||||
|
||||
before do
|
||||
sign_in @user
|
||||
end
|
||||
|
||||
it 'should manage reserved domains' do
|
||||
visit admin_reserved_domains_url
|
||||
page.should have_content('Reserved domains')
|
||||
|
||||
d = Fabricate.build(:domain, name: '110.ee')
|
||||
d.valid?
|
||||
d.errors.full_messages.should match_array([])
|
||||
|
||||
fill_in 'reserved_domains', with: "110.ee: testpw"
|
||||
click_button 'Save'
|
||||
|
||||
page.should have_content('Record updated')
|
||||
page.should have_content('110.ee: testpw')
|
||||
|
||||
d.valid?
|
||||
d.errors.full_messages.should match_array(["Domain is reserved and requires correct auth info"])
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue