Skip to content

Commit

Permalink
test mgmt api user locale validation (#155)
Browse files Browse the repository at this point in the history
CPCN-439
  • Loading branch information
petrjasek authored Dec 15, 2023
1 parent af312f6 commit ea1ff6d
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions server/features/mgmt_api_users.feature
Original file line number Diff line number Diff line change
Expand Up @@ -181,3 +181,38 @@ Feature: Management API - Users
}
"""
Then we get response code 200

Scenario: Validate locale

Given "companies"
"""
[{"name": "zzz company"}]
"""

When we post to "/users"
"""
{
"first_name": "John",
"last_name": "Cena",
"email": "[email protected]",
"company": "#companies._id#",
"locale": "fr"
}
"""

Then we get error 400
"""
{"code": 400, "message": "Locale is not in configured list of locales."}
"""

When we post to "/users"
"""
{
"first_name": "John",
"last_name": "Cena",
"email": "[email protected]",
"company": "#companies._id#",
"locale": "fr_CA"
}
"""
Then we get response code 201

0 comments on commit ea1ff6d

Please sign in to comment.