Skip to content

Commit

Permalink
Updating shipping product
Browse files Browse the repository at this point in the history
  • Loading branch information
sofianegargouri committed Feb 3, 2025
1 parent 0e52e63 commit da4bf60
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion spec/factories/shipping_products.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
FactoryBot.define do
factory :shipping_product do
shipping
product { build(:product, store: shipping.store) }
product { create(:product, store: shipping.store) }
quantity { rand(1..25) }
end
end
9 changes: 9 additions & 0 deletions spec/models/shipping_product_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# frozen_string_literal: true

require 'rails_helper'

RSpec.describe ShippingProduct do
it :has_valid_factory do
expect(build(:shipping_product)).to be_valid
end
end

0 comments on commit da4bf60

Please sign in to comment.