From 735c78d3ecb695dd16cb37879880f522c4b29c72 Mon Sep 17 00:00:00 2001 From: Johan Fleury Date: Mon, 8 Oct 2018 12:58:12 -0400 Subject: Import upstream version 1.7.0 --- tests/files/fail/test_type_text.yaml | 70 ++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 tests/files/fail/test_type_text.yaml (limited to 'tests/files/fail/test_type_text.yaml') diff --git a/tests/files/fail/test_type_text.yaml b/tests/files/fail/test_type_text.yaml new file mode 100644 index 0000000..f4e6d2e --- /dev/null +++ b/tests/files/fail/test_type_text.yaml @@ -0,0 +1,70 @@ +--- +name: fail-type-text-1 +desc: Test simples text type +data: True +schema: + type: text +errors: + - "Value 'True' is not of type 'text'. Path: ''" +--- +name: fail-type-text-2 +desc: Test possible values as values in seq +data: + - abc + - 123 + - 3.14159 + - True +schema: + type: seq + sequence: + - type: text +errors: + - "Value 'True' is not of type 'text'. Path: '/3'" +--- +name: fail-type-text-3 +desc: Test possible values as values in map +data: + foo: abc + bar: 123 + qwe: 3.14159 + rty: True +schema: + type: map + mapping: + foo: + type: text + bar: + type: text + qwe: + type: text + rty: + type: text +errors: + - "Value 'True' is not of type 'text'. Path: '/rty'" +--- +name: fail-type-text-4 +desc: Test that text type works inside nested map, seq, map +data: + foobar: + - foo: abc + bar: 123 + qwe: 3.14159 + rty: True +schema: + type: map + mapping: + foobar: + type: seq + sequence: + - type: map + mapping: + foo: + type: text + bar: + type: text + qwe: + type: text + rty: + type: text +errors: + - "Value 'True' is not of type 'text'. Path: '/foobar/0/rty'" -- cgit v1.2.3