diff options
Diffstat (limited to 'lib/configuration/tests')
| -rw-r--r-- | lib/configuration/tests/errors.t | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/lib/configuration/tests/errors.t b/lib/configuration/tests/errors.t index c4552d3..b12f29f 100644 --- a/lib/configuration/tests/errors.t +++ b/lib/configuration/tests/errors.t @@ -369,3 +369,47 @@ A field cannot be named "id" (reserved: it is the primary key of every row): in field "name": the name "id" is reserved: it is the primary key of every row, but got "id" + +Two fields with the same name but different types are rejected (in a content, +even across sections): + + $ tests --configuration <<EOF + > { + > "content": [ + > { + > "id": "entity", + > "section": [ + > { + > "field": [ + > { "name": "code", "label": {}, "type": "text" } + > ] + > }, + > { + > "field": [ + > { "name": "code", "label": {}, "type": "integer" } + > ] + > } + > ] + > } + > ] + > } + > EOF + Two fields named "code" with different types in "entity" + +Same for a list: + + $ tests --configuration <<EOF + > { + > "list": [ + > { + > "id": "country_list", + > "field": [ + > { "name": "code", "label": {}, "type": "text" }, + > { "name": "code", "label": {}, "type": "integer" } + > ] + > } + > ], + > "content": [] + > } + > EOF + Two fields named "code" with different types in "country_list" |
