Sha256: e77b95ee4e703fa6d3d69fd1ab25a62de8c36242f3e27e06b1fcbf1929bed6dc

Contents?: true

Size: 638 Bytes

Versions: 14

Compression:

Stored size: 638 Bytes

Contents

# frozen_string_literal: true

require 'rails_helper'

module Spree
  module Stock
    module LocationFilter
      RSpec.describe Active, type: :model do
        subject { described_class.new(stock_locations, order) }

        let!(:active_stock_location) { create(:stock_location) }
        let!(:inactive_stock_location) { create(:stock_location, active: false) }
        let(:stock_locations) { Spree::StockLocation.all }
        let(:order) { instance_double('Spree::Order') }

        it 'returns only active stock locations' do
          expect(subject.filter).to eq([active_stock_location])
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
solidus_core-2.10.5 spec/models/spree/stock/location_filter/active_spec.rb
solidus_core-2.10.3 spec/models/spree/stock/location_filter/active_spec.rb
solidus_core-2.10.2 spec/models/spree/stock/location_filter/active_spec.rb
solidus_core-2.9.6 spec/models/spree/stock/location_filter/active_spec.rb
solidus_core-2.10.1 spec/models/spree/stock/location_filter/active_spec.rb
solidus_core-2.9.5 spec/models/spree/stock/location_filter/active_spec.rb
solidus_core-2.10.0 spec/models/spree/stock/location_filter/active_spec.rb
solidus_core-2.9.4 spec/models/spree/stock/location_filter/active_spec.rb
solidus_core-2.9.3 spec/models/spree/stock/location_filter/active_spec.rb
solidus_core-2.9.2 spec/models/spree/stock/location_filter/active_spec.rb
solidus_core-2.10.0.beta1 spec/models/spree/stock/location_filter/active_spec.rb
solidus_core-2.9.1 spec/models/spree/stock/location_filter/active_spec.rb
solidus_core-2.9.0 spec/models/spree/stock/location_filter/active_spec.rb
solidus_core-2.9.0.rc.1 spec/models/spree/stock/location_filter/active_spec.rb