Skip to content

Commit

Permalink
companies need a user
Browse files Browse the repository at this point in the history
  • Loading branch information
fermion committed Mar 6, 2024
1 parent 24cd5b3 commit a323b1d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions spec/factories.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@

factory :company do
name { Faker::Company.name }

after(:build) do |company, _options|
next if company.memberships.any?

company.memberships << build(:membership, company: company)
end
end

factory :membership do
Expand Down

0 comments on commit a323b1d

Please sign in to comment.