From 61110336bc5a924346f0654cb5bb812101c3bc7a Mon Sep 17 00:00:00 2001 From: HombreLaser Date: Thu, 6 Apr 2023 14:53:02 -0600 Subject: AƱade specs de cxarts_controller MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- spec/models/product_cart_spec.rb | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'spec/models/product_cart_spec.rb') 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 -- cgit v1.2.3