Remove fixed registrar

#206
This commit is contained in:
Artur Beljajev 2016-10-24 16:04:51 +03:00
parent d27594603b
commit aaf6eb3a71
5 changed files with 5 additions and 9 deletions

View file

@ -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}" } }

View file

@ -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

View file

@ -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}" } }

View file

@ -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')

View file

@ -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|