Skip to content

Commit

Permalink
Merge pull request #41 from Purple-Stock/feat/add-items-to-count
Browse files Browse the repository at this point in the history
Feat/add items to count
  • Loading branch information
Pauloparakleto authored Jan 4, 2024
2 parents 6255c74 + aa647a7 commit 49389b5
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 3 deletions.
1 change: 0 additions & 1 deletion app/models/item.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,5 @@
#
class Item < ApplicationRecord
belongs_to :account
belongs_to :product
belongs_to :bling_order_item
end
2 changes: 1 addition & 1 deletion spec/models/bling_order_item_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion spec/models/item_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 49389b5

Please sign in to comment.