Skip to content

Commit

Permalink
Add test for Varinat#position
Browse files Browse the repository at this point in the history
  • Loading branch information
tkimi committed Nov 14, 2023
1 parent 9b6448f commit a560a6b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions core/spec/models/spree/variant_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,16 @@
end
end

describe 'acts_as_list' do
it 'sets variant position by acts_as_list' do
expect(variant.product.master.position).to eq 1
expect(variant.position).to eq 2

multi_variant = create(:variant, product: variant.product)
expect(multi_variant.position).to eq 3
end
end

describe '#in_stock?' do
before do
stub_spree_preferences(track_inventory_levels: true)
Expand Down

0 comments on commit a560a6b

Please sign in to comment.