generated from superdesk/newsroom-app
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/cn-uat' into fix-mgmt-api-produc…
…ts-assignments
- Loading branch information
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -171,3 +171,38 @@ Feature: Management API - Users | |
] | ||
} | ||
""" | ||
|
||
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 |