Skip to content

Commit

Permalink
Set stock_item count_on_hand and use that in variant#in_stock? test
Browse files Browse the repository at this point in the history
  • Loading branch information
radar committed Oct 8, 2013
1 parent d38226d commit 7781000
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/spec/models/spree/variant_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@

context 'when stock_items in stock' do
before do
Spree::StockItem.any_instance.stub(count_on_hand: 10)
variant.stock_items.first.update_column(:count_on_hand, 10)
end

it 'returns true if stock_items in stock' do
Expand Down

0 comments on commit 7781000

Please sign in to comment.