summaryrefslogtreecommitdiff
path: root/tests/files/fail/test_type_text.yaml
diff options
context:
space:
mode:
authorJohan Fleury <jfleury@arcaik.net>2018-10-08 12:58:12 -0400
committerJohan Fleury <jfleury@arcaik.net>2018-10-08 12:58:12 -0400
commit735c78d3ecb695dd16cb37879880f522c4b29c72 (patch)
tree8bfb2ecbd0f03730efa1540cc65d8490b67e8ddd /tests/files/fail/test_type_text.yaml
Import upstream version 1.7.0
Diffstat (limited to 'tests/files/fail/test_type_text.yaml')
-rw-r--r--tests/files/fail/test_type_text.yaml70
1 files changed, 70 insertions, 0 deletions
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'"