1
0
Fork 0

Rename factory "person" to "initial_person"

This commit is contained in:
Alex Kotov 2018-12-15 10:57:22 +05:00
parent a571f7600d
commit fb99c6e4ef
No known key found for this signature in database
GPG key ID: 4E831250F47DE154
4 changed files with 4 additions and 5 deletions

View file

@ -8,7 +8,7 @@ FactoryBot.define do
end
factory :personal_account, parent: :usual_account do
association :person
association :person, factory: :initial_person
end
factory :superuser_account, parent: :personal_account do

View file

@ -1,6 +1,5 @@
# frozen_string_literal: true
FactoryBot.define do
factory :person do
end
factory :initial_person, class: Person
end

View file

@ -41,7 +41,7 @@ Given 'I am signed in with email {string} ' \
end
Given 'I am signed in as party member' do
@person = create :person
@person = create :initial_person
@account = create :usual_account, person: @person
create :membership_app, account: @account
@user = @account.user

View file

@ -3,7 +3,7 @@
require 'rails_helper'
RSpec.describe Person do
subject { create :person }
subject { create :initial_person }
it { is_expected.to belong_to(:regional_office).optional }