FactoryGirl.define do
  factory :transaction do
    amount Faker::Number.number(3)
    user
    project
  end
end

FactoryGirl.define do
  factory :transaction do
    amount Faker::Number.number(3)
    association :sender, factory: :user
    association :recipient, factory: :project
  end
end

Fix polymorphic association in transaction factory
Fix polymorphic association in transaction factory