Add explicit mutual contact to test data

Add explicit mutual contact creation to the DataGenerator#generic_user_data
which is used in account deletion tests.
parent 8f460738
......@@ -14,6 +14,7 @@ describe DataGenerator do
generator.generic_user_data
expect(user.aspects).not_to be_empty
expect(Post.subscribed_by(user)).not_to be_empty
expect(Contact.where(user: user).mutual).not_to be_empty
end
end
......
......@@ -38,6 +38,7 @@ class DataGenerator
private_post_as_receipient
tag_following
generic_person_data
remote_mutual_friend
end
def generic_person_data
......@@ -98,6 +99,10 @@ class DataGenerator
}
end
def remote_mutual_friend
FactoryGirl.create(:contact, user: user, sharing: true, receiving: true)
end
def first_aspect
user.aspects.first || FactoryGirl.create(:aspect, user: user)
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment