summaryrefslogtreecommitdiff
path: root/spec/models
diff options
context:
space:
mode:
authorHombreLaser <sebastian-440@live.com>2023-04-06 14:53:02 -0600
committerHombreLaser <sebastian-440@live.com>2023-04-06 14:53:02 -0600
commit61110336bc5a924346f0654cb5bb812101c3bc7a (patch)
treed51511956e1246819c2480a4f3c30b6074bfe7ad /spec/models
parentfc191f53503629087fd453e626ec2a4c58e0a21b (diff)
Añade specs de cxarts_controller
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