Sha256: 0fb9507487aae591d27028742e18703d9c08da8b0243117b6e2fd8bf3d7724f8

Contents?: true

Size: 532 Bytes

Versions: 12

Compression:

Stored size: 532 Bytes

Contents

require File.expand_path('../../test_helper', __FILE__)

module Propono
  class HashTest < Minitest::Test
    def test_symbolize_keys_works
      input = {
        "foo" => "bar",
        cat: 1,
        "nest" => {
          "dog" => [
            {"mouse" => true}
          ]
        }
      }
      expected = {
        foo: 'bar',
        cat: 1,
        nest: {
          dog: [
            {"mouse" => true}
          ]
        }
      }

      assert_equal expected, Propono::Utils.symbolize_keys(input)
    end
  end
end


Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
propono-3.0.0 test/utils/hash_test.rb
propono-2.2.1 test/utils/hash_test.rb
propono-2.2.0 test/utils/hash_test.rb
propono-2.1.0 test/utils/hash_test.rb
propono-2.0.0 test/utils/hash_test.rb
propono-2.0.0.rc3 test/utils/hash_test.rb
propono-2.0.0.rc2 test/utils/hash_test.rb
propono-2.0.0.rc1 test/utils/hash_test.rb
propono-1.7.0 test/utils/hash_test.rb
propono-1.6.0 test/utils/hash_test.rb
propono-1.5.0 test/utils/hash_test.rb
propono-1.4.0 test/utils/hash_test.rb