Use FactoryBot factories instead of fabricators

This commit is contained in:
Artur Beljajev 2017-10-28 21:36:17 +03:00
parent 0cd913daf8
commit 9fd02c738f
30 changed files with 241 additions and 267 deletions

View file

@ -4,11 +4,15 @@ RSpec.describe Domain do
it { is_expected.to alias_attribute(:force_delete_time, :force_delete_at) }
before :example do
Fabricate(:zone, origin: 'ee')
create(:zone, origin: 'ee')
end
it 'should set force delete time' do
domain = Fabricate(:domain)
domain = build(:domain)
domain.nameservers.build(attributes_for(:nameserver))
domain.nameservers.build(attributes_for(:nameserver))
domain.save!
domain.statuses = ['ok']
domain.schedule_force_delete