summaryrefslogtreecommitdiff
path: root/spec/models
diff options
context:
space:
mode:
Diffstat (limited to 'spec/models')
-rw-r--r--spec/models/product_cart_spec.rb13
1 files changed, 11 insertions, 2 deletions
diff --git a/spec/models/product_cart_spec.rb b/spec/models/product_cart_spec.rb
index 5a300b8..00a8f6c 100644
--- a/spec/models/product_cart_spec.rb
+++ b/spec/models/product_cart_spec.rb
@@ -1,6 +1,15 @@
+# frozen_string_literal: true
+
require 'rails_helper'
RSpec.describe ProductCart, type: :model do
- it { should belong_to(:product) }
- it { should belong_to(:cart) }
+ let(:product_cart) { create(:product_cart) }
+
+ it 'should belong to product' do
+ expect(product_cart).to respond_to(:product)
+ end
+
+ it 'should belong to cart' do
+ expect(product_cart).to respond_to(:cart)
+ end
end