-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1052 from OneCommunityGlobal/parthj_unit_tests_an…
…d_integration_test_for_timeZoneAPIController.js Parthj unit tests and integration test for time zone api controller.js
- Loading branch information
Showing
7 changed files
with
833 additions
and
298 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
Check mark: ✅ | ||
Cross Mark: ❌ | ||
|
||
# Get Time Zone | ||
|
||
> ## Positive case | ||
1. ✅ Returns status code 200 and response data as follows: | ||
i. current location | ||
ii. timezone | ||
|
||
> ## Negative case | ||
1. ✅ Returns status code 403, if the user is not authorised. | ||
2. ✅ Returns status code 401, if the API key is missing. | ||
3. ✅ Returns status code 400, if the location is missing. | ||
4. ✅ Returns status code 404, if geocodeAPIEndpoint returns no results. | ||
5. ✅ Returns status code 500, if any other error occurs. | ||
|
||
> ## Edge case |
20 changes: 20 additions & 0 deletions
20
requirements/timeZoneAPIController/getTimeZoneProfileInitialSetup.md
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
Check mark: ✅ | ||
Cross Mark: ❌ | ||
|
||
# Get Time Zone | ||
|
||
> ## Positive case | ||
1. ✅ Returns status code 200 and response data as follows: | ||
i. current location | ||
ii. timezone | ||
|
||
> ## Negative case | ||
1. ✅ Returns status code 400, if the token is missing in the request body. | ||
2. ✅ Returns status code 403, if the no document exists in ProfileInitialSetupToken database with requested token. | ||
3. ✅ Returns status code 400, if the location is missing. | ||
4. ✅ Returns status code 404, if geocodeAPIEndpoint returns no results. | ||
5. ✅ Returns status code 500, if any other error occurs. | ||
|
||
> ## Edge case |
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
Oops, something went wrong.