mirror of
https://github.com/internetee/registry.git
synced 2025-07-04 10:13:34 +02:00
parent
d27594603b
commit
aaf6eb3a71
5 changed files with 5 additions and 9 deletions
|
@ -1,5 +1,5 @@
|
|||
Fabricator(:contact) do
|
||||
registrar { Registrar.find_by_code('FIXED') }
|
||||
registrar { Fabricate(:registrar) }
|
||||
code { sequence(:code) { |i| "SH#{Faker::Number.number(8)}#{i}" } }
|
||||
auth_info 'password'
|
||||
name { sequence(:name) { |i| "#{Faker::Name.name}#{i}" } }
|
||||
|
|
|
@ -7,7 +7,7 @@ Fabricator(:domain) do
|
|||
nameservers(count: 3)
|
||||
admin_domain_contacts(count: 1) { Fabricate(:admin_domain_contact) }
|
||||
tech_domain_contacts(count: 1) { Fabricate(:tech_domain_contact) }
|
||||
registrar { Registrar.find_by_code('FIXED') }
|
||||
registrar { Fabricate(:registrar) }
|
||||
auth_info '98oiewslkfkd'
|
||||
end
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
Fabricator(:registrant) do
|
||||
registrar { Registrar.find_by_code('FIXED') }
|
||||
registrar { Fabricate(:registrar) }
|
||||
code { sequence(:code) { |i| "REGISTRANT#{Faker::Number.number(8)}#{i}" } }
|
||||
auth_info 'password'
|
||||
name { sequence(:name) { |i| "REGISTRANT #{Faker::Name.name}#{i}" } }
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
require 'rails_helper'
|
||||
|
||||
feature 'Sessions', type: :feature do
|
||||
RSpec.feature 'Sessions' do
|
||||
context 'with invalid ip' do
|
||||
it 'should not see login page' do
|
||||
Setting.registrar_ip_whitelist_enabled = true
|
||||
|
@ -18,6 +18,7 @@ feature 'Sessions', type: :feature do
|
|||
end
|
||||
|
||||
it 'should see log in' do
|
||||
@fixed_registrar = Fabricate(:registrar, name: 'fixed registrar', code: 'FIXED')
|
||||
@fixed_registrar.white_ips = [Fabricate(:white_ip_registrar)]
|
||||
visit registrar_login_path
|
||||
page.should have_text('Log in')
|
||||
|
|
|
@ -45,11 +45,6 @@ def create_settings
|
|||
Setting.tech_contacts_max_count = 10
|
||||
|
||||
Setting.client_side_status_editing_enabled = true
|
||||
|
||||
# speedup and easier to create fabrications
|
||||
@fixed_registrar =
|
||||
Registrar.find_by_name('fixed registrar') ||
|
||||
Fabricate(:registrar, name: 'fixed registrar', code: 'FIXED')
|
||||
end
|
||||
|
||||
RSpec.configure do |config|
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue