mirror of
https://github.com/internetee/registry.git
synced 2025-06-10 06:34:46 +02:00
covered reserved domains
This commit is contained in:
parent
e15746c617
commit
ad86d3dad9
1 changed files with 49 additions and 0 deletions
49
test/integration/admin_area/reserved_domains_test.rb
Normal file
49
test/integration/admin_area/reserved_domains_test.rb
Normal file
|
@ -0,0 +1,49 @@
|
|||
require 'test_helper'
|
||||
require 'application_system_test_case'
|
||||
|
||||
class AdminAreaReservedDomainsIntegrationTest < JavaScriptApplicationSystemTestCase
|
||||
|
||||
setup do
|
||||
WebMock.allow_net_connect!
|
||||
@original_default_language = Setting.default_language
|
||||
sign_in users(:admin)
|
||||
|
||||
@reserved_domain = reserved_domains(:one)
|
||||
end
|
||||
|
||||
def test_remove_reserved_domain
|
||||
visit admin_reserved_domains_path
|
||||
|
||||
click_link_or_button 'Delete', match: :first
|
||||
|
||||
# Accept to delete in modal window
|
||||
page.driver.browser.switch_to.alert.accept
|
||||
|
||||
assert_text 'Domain deleted!'
|
||||
end
|
||||
|
||||
def test_add_invalid_domain
|
||||
visit admin_reserved_domains_path
|
||||
|
||||
click_on 'New reserved domain'
|
||||
|
||||
fill_in "Name", with: "@##@$"
|
||||
|
||||
click_on 'Save'
|
||||
|
||||
assert_text 'Failed to add domain!'
|
||||
end
|
||||
|
||||
def test_update_reserved_domain
|
||||
visit admin_reserved_domains_path
|
||||
|
||||
click_link_or_button 'Edit Pw', match: :first
|
||||
|
||||
fill_in 'Password', with: '12345678'
|
||||
|
||||
click_on 'Save'
|
||||
|
||||
assert_text 'Domain updated!'
|
||||
end
|
||||
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue