Skip to content

Commit

Permalink
tests: added advanced matchers
Browse files Browse the repository at this point in the history
  • Loading branch information
mmadariaga committed Apr 24, 2024
1 parent eddd1e1 commit 37e2ab4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions app/features/demo/administrator/postAdministrator.feature
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ Feature: Create administrators
Then the response status code should be 201
And the response should be in JSON
And the header "Content-Type" should be equal to "application/json; charset=utf-8"
And the JSON should be equal to:
And the JSON should be like:
"""
{
"username": "admin3",
"pass": "*****",
"email": "[email protected]",
"name": "Name",
"lastname": "Last name",
"id": 3
"id": "match:type(integer)"
}
"""

Expand All @@ -40,14 +40,14 @@ Feature: Create administrators
Then the response status code should be 200
And the response should be in JSON
And the header "Content-Type" should be equal to "application/json; charset=utf-8"
And the JSON should be equal to:
And the JSON should be like:
"""
{
"username": "admin3",
"pass": "*****",
"email": "[email protected]",
"name": "Name",
"lastname": "Last name",
"id": 3
"id": "match:regexp(/[0-9]+/)"
}
"""
4 changes: 2 additions & 2 deletions app/features/demo/administrator/putAdministrator.feature
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@
Then the response status code should be 200
And the response should be in JSON
And the header "Content-Type" should be equal to "application/json; charset=utf-8"
And the JSON should be equal to:
And the JSON should be like:
"""
{
"username": "admin_updated",
"pass": "*****",
"email": "[email protected]",
"name": "Name_updated",
"lastname": "Last name updated",
"id": 2
"id": "match:type(number)"
}
"""

0 comments on commit 37e2ab4

Please sign in to comment.