diff --git a/app/models/item.rb b/app/models/item.rb index 5c2911ab..8488c2d0 100644 --- a/app/models/item.rb +++ b/app/models/item.rb @@ -19,6 +19,5 @@ # class Item < ApplicationRecord belongs_to :account - belongs_to :product belongs_to :bling_order_item end diff --git a/spec/models/bling_order_item_spec.rb b/spec/models/bling_order_item_spec.rb index 3771232f..1c28d294 100644 --- a/spec/models/bling_order_item_spec.rb +++ b/spec/models/bling_order_item_spec.rb @@ -54,7 +54,7 @@ end it 'counts 1 item' do - expect(order.items.length).to eq(1) + expect(order.items.count).to eq(1) end it 'has quantity 1' do diff --git a/spec/models/item_spec.rb b/spec/models/item_spec.rb index dd0f56bd..d29483c0 100644 --- a/spec/models/item_spec.rb +++ b/spec/models/item_spec.rb @@ -21,7 +21,6 @@ RSpec.describe Item, type: :model do describe 'associations' do - it { is_expected.to belong_to(:product) } it { is_expected.to belong_to(:account) } it { is_expected.to belong_to(:bling_order_item) } end