Skip to content

Commit

Permalink
Move enterprise logo and promo_image setting in factories to after cr…
Browse files Browse the repository at this point in the history
…eation fixes a problem with enterprise_roles in the enterprise validation
  • Loading branch information
luisramos0 committed Feb 22, 2020
1 parent e64d21d commit 5769095
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions spec/factories/enterprise_factory.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
factory :enterprise, class: Enterprise do
transient do
users []
logo {}
promo_image {}
end

owner { FactoryBot.create :user }
Expand All @@ -15,6 +17,8 @@
proxy.users.each do |user|
enterprise.users << user unless enterprise.users.include?(user)
end
enterprise.logo = proxy.logo
enterprise.promo_image = proxy.promo_image
end
end

Expand Down

0 comments on commit 5769095

Please sign in to comment.