Skip to content

Commit

Permalink
corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
brunoLombardo committed Jul 29, 2024
1 parent e7d821f commit 4a47019
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion test/factories/gifts.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
content_type: 'image/png'
)
gift.supplier ||= create(:supplier)
gift.categories ||= create_list(:category, 3)
gift.categories = create_list(:category, 3) if gift.categories.empty?
end

trait(:with_customizations) do
Expand Down
4 changes: 2 additions & 2 deletions test/factories/purchases.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
purchase.destinations = build_list(:destination, 1,
purchase: purchase)
end
purchase.gift = create(:gift) if purchase.gift.nil?
purchase.payment_method = create(:payment_method) if purchase.payment_method.nil?
purchase.gift ||= create(:gift)
purchase.payment_method ||= create(:payment_method)
purchase.subtotal = purchase.amount * purchase.gift_price
purchase.price = purchase.subtotal + (purchase.subtotal * 0.22).to_i + 180
end
Expand Down

0 comments on commit 4a47019

Please sign in to comment.