Sha256: 87eceda3a7862452a184e2a6c3cad1324d4cbe078102a049a7a6c2139e79b7ec

Contents?: true

Size: 451 Bytes

Versions: 1

Compression:

Stored size: 451 Bytes

Contents

require_relative 'test_helper'

class SkuVendorTest < Skr::TestCase

    def test_associations
        sv = skr_sku_vendors(:hat_bigco)
        assert_equal sv.vendor, skr_vendors(:bigco)
        assert_equal sv.sku,    skr_skus(:hat)
        skr_skus(:hat).sku_vendors.where( part_code: sv.part_code ).first.must_equal sv
        skr_vendors(:bigco).sku_vendors.where( vendor_id: sv.vendor, part_code: sv.part_code ).first.must_equal sv
    end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
stockor-core-0.2 test/sku_vendor_test.rb