Skip to content

Commit

Permalink
Add default test
Browse files Browse the repository at this point in the history
  • Loading branch information
SamRemis committed Dec 4, 2024
1 parent 8960ef1 commit c7b1f6a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 11 additions & 1 deletion tests/unit/data/endpoints/test-cases/array-index.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
}
},
{
"documentation": "Fallback when array is unset",
"documentation": "Resolved value when array is explictly set to empty",
"params": {
"ResourceList": []
},
Expand All @@ -22,6 +22,16 @@
"url": "https://www.example.com"
}
}
},
{
"documentation": "Resolved value to default if array is unset",
"params": {
},
"expect": {
"endpoint": {
"url": "https://www.default1.example.com"
}
}
}
]
}
2 changes: 2 additions & 0 deletions tests/unit/data/endpoints/valid-rules/array-index.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
"version": "1.3",
"parameters": {
"ResourceList": {
"required": true,
"default": ["default1", "default2"],
"type": "stringArray"
}
},
Expand Down

0 comments on commit c7b1f6a

Please sign in to comment.