Sha256: 72527d7d01e41adee4310fbee83f3924ae5f69cda81490c6c2b08d0e502df75d
Contents?: true
Size: 706 Bytes
Versions: 5
Compression:
Stored size: 706 Bytes
Contents
require 'test_helper' module Workarea class FeaturedBrowseOptionProductsTest < TestCase class Foo include FeaturedBrowseOptionProducts attr_accessor :product_ids end def test_featured_product? model = Foo.new product = Catalog::Product.new model.product_ids = [product.id] assert(model.featured_product?(product.id)) model.product_ids = [BrowseOptionIds.build(product.id, 'blue')] assert(model.featured_product?(product.id)) end def test_unique_product_ids model = Foo.new model.product_ids = ['1245', BrowseOptionIds.build('2451', 'red')] assert_equal(%w(1245 2451), model.unique_product_ids) end end end
Version data entries
5 entries across 5 versions & 1 rubygems