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.
Fix(mgmt_api) :Newly created companies should be assigned Canada as t…
…heir country in the user profile [CPCN-385]] (#139) * Fix(mgmt_api) : add default country canada in companies resource [CPCN-385] * reformat code via black * update test
- Loading branch information
1 parent
d74cf83
commit b7b9b82
Showing
2 changed files
with
78 additions
and
27 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
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 |
---|---|---|
|
@@ -52,3 +52,33 @@ Feature: Management API - Companies | |
""" | ||
{"name": "xyz company"} | ||
""" | ||
|
||
Scenario: Create a company with default country | ||
Given empty "companies" | ||
When we post to "/companies" | ||
""" | ||
{ | ||
"name": "zzz company", | ||
"contact_name": "zzz company", | ||
"contact_email": "[email protected]", | ||
"phone": "99999999" | ||
} | ||
""" | ||
Then we get response code 201 | ||
When we get "/companies" | ||
Then we get existing resource | ||
""" | ||
{ | ||
"_items" : | ||
[ | ||
{ | ||
"name": "zzz company", | ||
"contact_name": "zzz company", | ||
"country": "CAN", | ||
"contact_email": "[email protected]", | ||
"phone": "99999999" | ||
} | ||
] | ||
} | ||
""" | ||
|