Sha256: e0cc2f4b49b4f9bc1901a42276b2639d8e96e8b3c40c34aabc4d9e794e9acd13

Contents?: true

Size: 535 Bytes

Versions: 2

Compression:

Stored size: 535 Bytes

Contents

require_relative '../test_helper'

class StructuredListHelperTest < MiniTest::Test
  def setup
    @structured_list = Helper::StructuredList.new(:order_status)
  end

  def test_builds_a_structured_list_for_a_single_value
    exp = { 'OrderStatus.Status.1' => 'foo' }
    assert_equal(exp, @structured_list.build('foo'))
  end

  def test_builds_a_structured_list_for_an_array_of_values
    exp = { 'OrderStatus.Status.1' => 'foo', 'OrderStatus.Status.2' => 'bar' }
    assert_equal(exp, @structured_list.build(%w(foo bar)))
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
mws-orders-0.0.2 test/helpers/structured_list_test.rb
mws-orders-0.0.1 test/helpers/structured_list_test.rb