Skip to content

Commit

Permalink
tests for limits
Browse files Browse the repository at this point in the history
  • Loading branch information
hiddewie committed Jul 21, 2024
1 parent 2ec1fd4 commit 252101c
Showing 1 changed file with 37 additions and 1 deletion.
38 changes: 37 additions & 1 deletion api/tests/api.hurl
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,23 @@ HTTP 200
[Asserts]
jsonpath "$" count == 25

# TODO request with too large limit
# Facility request too large limit
GET {{base_url}}/facility
[QueryStringParams]
name: Berlin
limit: 201
HTTP 422
[Asserts]
jsonpath "$.detail[0].msg" == "Input should be less than or equal to 200"

# Facility request too small limit
GET {{base_url}}/facility
[QueryStringParams]
name: Berlin
limit: 0
HTTP 422
[Asserts]
jsonpath "$.detail[0].msg" == "Input should be greater than or equal to 1"

# Facility request with hyphen
GET {{base_url}}/facility
Expand Down Expand Up @@ -117,3 +133,23 @@ HTTP 200
jsonpath "$" count == 1
jsonpath "$[0].ref" == "6020"
jsonpath "$[0].position" == 22.7

# Milestone request too small limit
GET {{base_url}}/milestone
[QueryStringParams]
ref: 6020
position: 22.7
limit: 0
HTTP 422
[Asserts]
jsonpath "$.detail[0].msg" == "Input should be greater than or equal to 1"

# Milestone request too large limit
GET {{base_url}}/milestone
[QueryStringParams]
ref: 6020
position: 22.7
limit: 201
HTTP 422
[Asserts]
jsonpath "$.detail[0].msg" == "Input should be less than or equal to 200"

0 comments on commit 252101c

Please sign in to comment.