Sha256: 7729029c2e242895353da099508fc523007b4c65ca8b1f18515f18e948865d3e
Contents?: true
Size: 682 Bytes
Versions: 28
Compression:
Stored size: 682 Bytes
Contents
require 'test_helper' module Workarea module Search class FacetSorting class SizeTest < TestCase def test_call Workarea.config.search_facet_size_sort = %(XS S M L XL) results = { 'M' => 50, 'L' => 40, 'S' => 30, 'XL' => 20, 'XS' => 10 } assert_equal( { 'XS' => 10, 'S' => 30, 'M' => 50, 'L' => 40, 'XL' => 20 }, Size.call(:size, results) ) results = { 'M' => 50, 'Small' => 40, 'XXL' => 30, 'XL' => 20 } assert_equal( { 'M' => 50, 'XL' => 20, 'Small' => 40, 'XXL' => 30 }, Size.call(:size, results) ) end end end end end
Version data entries
28 entries across 28 versions & 1 rubygems