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.
This commit is contained in:
parent
8f46073809
commit
e2979df65a
2 changed files with 6 additions and 0 deletions
|
|
@ -14,6 +14,7 @@ describe DataGenerator do
|
||||||
generator.generic_user_data
|
generator.generic_user_data
|
||||||
expect(user.aspects).not_to be_empty
|
expect(user.aspects).not_to be_empty
|
||||||
expect(Post.subscribed_by(user)).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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,7 @@ class DataGenerator
|
||||||
private_post_as_receipient
|
private_post_as_receipient
|
||||||
tag_following
|
tag_following
|
||||||
generic_person_data
|
generic_person_data
|
||||||
|
remote_mutual_friend
|
||||||
end
|
end
|
||||||
|
|
||||||
def generic_person_data
|
def generic_person_data
|
||||||
|
|
@ -98,6 +99,10 @@ class DataGenerator
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def remote_mutual_friend
|
||||||
|
FactoryGirl.create(:contact, user: user, sharing: true, receiving: true)
|
||||||
|
end
|
||||||
|
|
||||||
def first_aspect
|
def first_aspect
|
||||||
user.aspects.first || FactoryGirl.create(:aspect, user: user)
|
user.aspects.first || FactoryGirl.create(:aspect, user: user)
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue