Sha256: a3296ba68adc44d5c4e4a9299708ff1d956c75ad96e271c7f90d47754dfb06ca
Contents?: true
Size: 661 Bytes
Versions: 14
Compression:
Stored size: 661 Bytes
Contents
# frozen_string_literal: true require 'rails_helper' module Spree module Stock module LocationSorter RSpec.describe DefaultFirst, type: :model do subject { described_class.new(stock_locations) } let!(:first_stock_location) { create(:stock_location, default: false) } let!(:second_stock_location) { create(:stock_location, default: true) } let(:stock_locations) { Spree::StockLocation.all } let(:sorted_stock_locations) { stock_locations.reverse } it 'returns the default stock location first' do expect(subject.sort).to eq(sorted_stock_locations) end end end end end
Version data entries
14 entries across 14 versions & 1 rubygems