Skip to content

Commit

Permalink
Added factory "requirements"
Browse files Browse the repository at this point in the history
  • Loading branch information
lentschi committed Feb 5, 2021
1 parent 45a8911 commit 1668bff
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion spec/factories/group_order.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

FactoryBot.define do

# requires order
factory :group_order do
order
ordergroup { create(:user, groups: [FactoryBot.create(:ordergroup)]).ordergroup }
updated_by { create :user }
end
Expand Down
3 changes: 2 additions & 1 deletion spec/factories/group_order_article.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

FactoryBot.define do

# requires order_article
factory :group_order_article do
group_order
order_article
end

end
2 changes: 1 addition & 1 deletion spec/factories/group_order_article_quantity.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

FactoryBot.define do

# requires order_article
factory :group_order_article_quantity do
group_order_article
end

end
10 changes: 10 additions & 0 deletions spec/factories/order_article.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
require 'factory_bot'

FactoryBot.define do

factory :order_article do
order
article
end

end

0 comments on commit 1668bff

Please sign in to comment.