Use factory instead of fabricator for WhiteIp

#600
This commit is contained in:
Artur Beljajev 2017-09-29 19:08:59 +03:00
parent e840719b8a
commit 687d56c412
4 changed files with 6 additions and 10 deletions

View file

@ -9,7 +9,6 @@ Fabricator(:registrar) do
country_code 'EE'
code { sequence(:code) { |i| "REGISTRAR#{i}" } }
reference_no { sequence(:reference_no) { |i| "RF#{i}" } }
white_ips { [Fabricate(:white_ip), Fabricate(:white_ip, interfaces: [WhiteIp::REGISTRAR])] }
end
Fabricator(:registrar_with_no_account_activities, from: :registrar) do

View file

@ -1,8 +0,0 @@
Fabricator(:white_ip) do
ipv4 '127.0.0.1'
interfaces [WhiteIp::API]
end
Fabricator(:white_ip_registrar, from: :white_ip) do
interfaces [WhiteIp::REGISTRAR]
end

View file

@ -0,0 +1,5 @@
FactoryGirl.define do
factory :white_ip do
ipv4 '127.0.0.1'
end
end

View file

@ -25,7 +25,7 @@ describe WhiteIp do
context 'with valid attributes' do
before :all do
@white_ip = Fabricate(:white_ip)
@white_ip = create(:white_ip)
end
it 'should have one version' do