Sha256: 5b839ee1f14633230a02cdaade5e3126458723a447c638efc19eb6a5d81ea912
Contents?: true
Size: 610 Bytes
Versions: 62
Compression:
Stored size: 610 Bytes
Contents
require 'test_helper' module Workarea module Storefront module ContentBlocks class ProductListViewModelTest < TestCase def test_returns_products_in_the_order_of_stored_product_ids block = Content::Block.new( type_id: :product_list, data: { products: [ create_product(id: '1').id, create_product(id: '2').id ] } ) view_model = ProductListViewModel.wrap(block) assert_equal(%w(1 2), view_model.products.map(&:id)) end end end end end
Version data entries
62 entries across 62 versions & 1 rubygems