Sha256: e27f03d3c65b23feb01c2a18c393528b6326fb4566554945306a8d8725c294a8

Contents?: true

Size: 721 Bytes

Versions: 62

Compression:

Stored size: 721 Bytes

Contents

require 'test_helper'
require 'workarea/lint'

module Workarea
  class Lint
    load_lints

    class SkusMissingInventoryTest < TestCase
      def test_errors_for_each_variant_sku_missing_inventory
        Catalog::Product.create!(name: 'Foo', variants: [{ sku: '123' }])
        Catalog::Product.create!(name: 'Bar', variants: [{ sku: '456' }])

        lint = SkusMissingInventory.new
        lint.run

        assert_equal(2, lint.errors)
      end

      def test_errors_for_each_inventory_sku_missing_inventory
        Pricing::Sku.create!(id: '123')
        Pricing::Sku.create!(id: '456')

        lint = SkusMissingInventory.new
        lint.run

        assert_equal(2, lint.errors)
      end
    end
  end
end

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
workarea-core-3.4.27 test/lib/workarea/lint/skus_missing_inventory_test.rb
workarea-core-3.5.4 test/lib/workarea/lint/skus_missing_inventory_test.rb
workarea-core-3.4.26 test/lib/workarea/lint/skus_missing_inventory_test.rb
workarea-core-3.5.3 test/lib/workarea/lint/skus_missing_inventory_test.rb
workarea-core-3.4.25 test/lib/workarea/lint/skus_missing_inventory_test.rb
workarea-core-3.5.2 test/lib/workarea/lint/skus_missing_inventory_test.rb
workarea-core-3.4.24 test/lib/workarea/lint/skus_missing_inventory_test.rb
workarea-core-3.5.1 test/lib/workarea/lint/skus_missing_inventory_test.rb
workarea-core-3.4.23 test/lib/workarea/lint/skus_missing_inventory_test.rb
workarea-core-3.4.22 test/lib/workarea/lint/skus_missing_inventory_test.rb
workarea-core-3.5.0 test/lib/workarea/lint/skus_missing_inventory_test.rb
workarea-core-3.4.21 test/lib/workarea/lint/skus_missing_inventory_test.rb
workarea-core-3.5.0.beta.1 test/lib/workarea/lint/skus_missing_inventory_test.rb
workarea-core-3.4.20 test/lib/workarea/lint/skus_missing_inventory_test.rb
workarea-core-3.4.19 test/lib/workarea/lint/skus_missing_inventory_test.rb
workarea-core-3.4.18 test/lib/workarea/lint/skus_missing_inventory_test.rb
workarea-core-3.4.17 test/lib/workarea/lint/skus_missing_inventory_test.rb
workarea-core-3.4.16 test/lib/workarea/lint/skus_missing_inventory_test.rb
workarea-core-3.4.15 test/lib/workarea/lint/skus_missing_inventory_test.rb
workarea-core-3.4.14 test/lib/workarea/lint/skus_missing_inventory_test.rb