mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 17:59:47 +02:00
31 lines
795 B
Ruby
31 lines
795 B
Ruby
require 'rails_helper'
|
|
|
|
feature 'BlockedDomain', type: :feature do
|
|
before :all do
|
|
Fabricate(:zonefile_setting, origin: 'ee')
|
|
@user = Fabricate(:admin_user)
|
|
end
|
|
|
|
before do
|
|
sign_in @user
|
|
end
|
|
|
|
it 'should manage blocked domains' do
|
|
visit admin_blocked_domains_url
|
|
page.should have_content('Blocked domains')
|
|
|
|
d = Fabricate.build(:domain, name: 'ftp.ee')
|
|
d.valid?
|
|
d.errors.full_messages.should match_array([])
|
|
|
|
fill_in 'blocked_domains', with: "ftp.ee\ncache.ee"
|
|
click_button 'Save'
|
|
|
|
page.should have_content('Record updated')
|
|
page.should have_content('ftp.ee')
|
|
page.should have_content('cache.ee')
|
|
|
|
d.valid?
|
|
d.errors.full_messages.should match_array(["Data management policy violation: Domain name is blocked [name]"])
|
|
end
|
|
end
|