test/unit/schemacop/v3/symbol_node_test.rb in schemacop-3.0.7 vs test/unit/schemacop/v3/symbol_node_test.rb in schemacop-3.0.8

- old
+ new

@@ -68,8 +68,22 @@ # These need to fail validation, as they are not in the enum list assert_validation(:foo) do error '/', 'Value not included in enum [1, 2, "foo", :bar, {:qux=>42}].' end end + + # rubocop:disable Lint/BooleanSymbol + def test_cast_str + schema :symbol, cast_str: true + + assert_cast('true', :true) + assert_cast('foo', :foo) + assert_cast('1', :'1') + + assert_cast(:true, :true) + assert_cast(:foo, :foo) + assert_cast(:'1', :'1') + end + # rubocop:enable Lint/BooleanSymbol end end end