Sha256: 6146cf131cd83dd3c292910309bbcb8117d9ba1e6553ce812bbe7b50c2ec906b

Contents?: true

Size: 715 Bytes

Versions: 62

Compression:

Stored size: 715 Bytes

Contents

require 'test_helper'
require 'workarea/lint'

module Workarea
  class Lint
    load_lints

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

        lint = SkusMissingPricing.new
        lint.run

        assert_equal(2, lint.errors)
      end

      def test_errors_for_each_inventory_sku_missing_pricing
        Inventory::Sku.create!(id: '123')
        Inventory::Sku.create!(id: '456')

        lint = SkusMissingPricing.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.5.27 test/lib/workarea/lint/skus_missing_pricing_test.rb
workarea-core-3.5.26 test/lib/workarea/lint/skus_missing_pricing_test.rb
workarea-core-3.4.45 test/lib/workarea/lint/skus_missing_pricing_test.rb
workarea-core-3.5.25 test/lib/workarea/lint/skus_missing_pricing_test.rb
workarea-core-3.5.23 test/lib/workarea/lint/skus_missing_pricing_test.rb
workarea-core-3.4.44 test/lib/workarea/lint/skus_missing_pricing_test.rb
workarea-core-3.5.22 test/lib/workarea/lint/skus_missing_pricing_test.rb
workarea-core-3.4.43 test/lib/workarea/lint/skus_missing_pricing_test.rb
workarea-core-3.5.21 test/lib/workarea/lint/skus_missing_pricing_test.rb
workarea-core-3.4.42 test/lib/workarea/lint/skus_missing_pricing_test.rb
workarea-core-3.5.20 test/lib/workarea/lint/skus_missing_pricing_test.rb
workarea-core-3.4.41 test/lib/workarea/lint/skus_missing_pricing_test.rb
workarea-core-3.5.19 test/lib/workarea/lint/skus_missing_pricing_test.rb
workarea-core-3.4.40 test/lib/workarea/lint/skus_missing_pricing_test.rb
workarea-core-3.5.18 test/lib/workarea/lint/skus_missing_pricing_test.rb
workarea-core-3.4.39 test/lib/workarea/lint/skus_missing_pricing_test.rb
workarea-core-3.5.17 test/lib/workarea/lint/skus_missing_pricing_test.rb
workarea-core-3.4.38 test/lib/workarea/lint/skus_missing_pricing_test.rb
workarea-core-3.5.16 test/lib/workarea/lint/skus_missing_pricing_test.rb
workarea-core-3.4.37 test/lib/workarea/lint/skus_missing_pricing_test.rb