summaryrefslogtreecommitdiff
path: root/lib/configuration/tests
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@dailly.me>2026-11-20 18:47:26 +0100
committerSébastien Dailly <sebastien@dailly.me>2026-11-20 18:47:26 +0100
commitfa4970bf1b74f3fa0b2f63cbd461d98c251dc0f0 (patch)
tree577a41415e67510f08f43fc48c794c36a10f6e80 /lib/configuration/tests
parentb05e2d2be7be28ee6c577671002797cf9abaf177 (diff)
Updated the model for representing ocaml types in the application type
Diffstat (limited to 'lib/configuration/tests')
-rw-r--r--lib/configuration/tests/errors.t44
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"