Unverified Commit e2979df6 authored by cmrd Senya's avatar cmrd Senya
Browse files

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
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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

+5 −0
Original line number Diff line number Diff line
@@ -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