Update integration tests for toDate filter
This commit is contained in:
parent
8bc7fe72d0
commit
e3a878c083
|
|
@ -149,7 +149,7 @@ error: Filter error
|
|||
| GET http://localhost:8000/error-filter
|
||||
| ...
|
||||
20 | jsonpath "$.id" toDate "%a, %d %b %Y %H:%M:%S GMT" == "unused"
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ invalid filter input: string <123x>
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ value <123x> could not be parsed with <%a, %d %b %Y %H:%M:%S GMT> format
|
||||
|
|
||||
|
||||
error: Filter error
|
||||
|
|
|
|||
|
|
@ -53,6 +53,9 @@ jsonpath "$.url" urlQueryParam "y" not exists
|
|||
jsonpath "$.encoded_url" urlQueryParam "x" == "шеллы"
|
||||
jsonpath "$.utf8_bytes" base64Decode utf8Decode == "Hello World"
|
||||
jsonpath "$.message" utf8Encode toHex == "48656c6c6f20426f6221"
|
||||
jsonpath "$.date_with_tz" toDate "%Y-%m-%dT%H:%M:%S%z" dateFormat "%a %b %d %H:%M:%S %Y %z" == "Thu Aug 27 07:07:46 2020 +0000"
|
||||
jsonpath "$.date_no_tz" toDate "%Y-%m-%dT%H:%M:%S" dateFormat "%a %b %d %H:%M:%S %Y %z" == "Thu Aug 27 09:07:46 2020 +0000"
|
||||
jsonpath "$.date_no_time" toDate "%Y-%m-%d" dateFormat "%a %b %d %H:%M:%S %Y %z" == "Thu Aug 27 00:00:00 2020 +0000"
|
||||
{
|
||||
"file": "0YjQtdC70LvRiw==",
|
||||
"text_encoded": "PDw_Pz8-Pg",
|
||||
|
|
@ -72,7 +75,10 @@ jsonpath "$.message" utf8Encode toHex == "48656c6c6f20426f6221"
|
|||
"json": "{\"message\": \"Hello\"}",
|
||||
"pi": "3.141592653589793",
|
||||
"ten": 10,
|
||||
"utf8_bytes": "SGVsbG8gV29ybGQ="
|
||||
"utf8_bytes": "SGVsbG8gV29ybGQ=",
|
||||
"date_with_tz": "2020-08-27T09:07:46+0200",
|
||||
"date_no_tz": "2020-08-27T09:07:46",
|
||||
"date_no_time": "2020-08-27"
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -106,5 +112,8 @@ jsonpath "$.list" nth {{index_last}} == 3
|
|||
"json": "{\"message\": \"Hello\"}",
|
||||
"pi": "3.141592653589793",
|
||||
"ten": 10,
|
||||
"utf8_bytes": "SGVsbG8gV29ybGQ="
|
||||
"utf8_bytes": "SGVsbG8gV29ybGQ=",
|
||||
"date_with_tz": "2020-08-27T09:07:46+0200",
|
||||
"date_no_tz": "2020-08-27T09:07:46",
|
||||
"date_no_time": "2020-08-27"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,5 +17,8 @@
|
|||
"json": "{\"message\": \"Hello\"}",
|
||||
"pi": "3.141592653589793",
|
||||
"ten": 10,
|
||||
"utf8_bytes": "SGVsbG8gV29ybGQ="
|
||||
"utf8_bytes": "SGVsbG8gV29ybGQ=",
|
||||
"date_with_tz": "2020-08-27T09:07:46+0200",
|
||||
"date_no_tz": "2020-08-27T09:07:46",
|
||||
"date_no_time": "2020-08-27"
|
||||
}
|
||||
|
|
@ -22,5 +22,8 @@ def filter():
|
|||
"json": "{\\"message\\": \\"Hello\\"}",
|
||||
"pi": "3.141592653589793",
|
||||
"ten": 10,
|
||||
"utf8_bytes": "SGVsbG8gV29ybGQ="
|
||||
"utf8_bytes": "SGVsbG8gV29ybGQ=",
|
||||
"date_with_tz": "2020-08-27T09:07:46+0200",
|
||||
"date_no_tz": "2020-08-27T09:07:46",
|
||||
"date_no_time": "2020-08-27"
|
||||
}"""
|
||||
|
|
|
|||
Loading…
Reference in New Issue