-
Notifications
You must be signed in to change notification settings - Fork 28
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 #1109 from OneCommunityGlobal/development
Backend Release to Main [2.00]
- Loading branch information
Showing
19 changed files
with
1,751 additions
and
54 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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
Check mark: ✅ | ||
Cross Mark: ❌ | ||
|
||
# Add Information | ||
|
||
> ## Positive case | ||
1. ✅ Returns 201 if adding new information successfullyn and no cache. | ||
2. ✅ Returns if adding new information successfully and hascache. | ||
|
||
> ## Negative case | ||
1. ✅ Returns error 500 if if there are no information in the database and any error occurs when finding the infoName. | ||
2. ✅ Returns error 400 if if there are duplicate infoName in the database. | ||
3. ✅ Returns error 400 if if there are issues when saving new informations. | ||
4. ✅ Returns error 400 if if there are errors when saving the new information. | ||
|
||
> ## 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
Check mark: ✅ | ||
Cross Mark: ❌ | ||
|
||
# Delete Information | ||
|
||
> ## Positive case | ||
1. ✅ Returns 200 if deleting informations successfull and no cache. | ||
2. ✅ Returns if deleting informations successfully and has cache. | ||
|
||
> ## Negative case | ||
1. ✅ Returns error 400 if if there is any error when finding the information by information id. | ||
|
||
> ## 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
Check mark: ✅ | ||
Cross Mark: ❌ | ||
|
||
# Get Information | ||
|
||
> ## Positive case | ||
1. ✅ Returns 200 if the informations key exists in NodeCache. | ||
2. ✅ Returns 200 if there are information in the database. | ||
|
||
> ## Negative case | ||
1. ✅ Returns error 404 if if there are no information in the database and any error occurs when finding the information. | ||
|
||
> ## 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
Check mark: ✅ | ||
Cross Mark: ❌ | ||
|
||
# Update Information | ||
|
||
> ## Positive case | ||
1. ✅ Returns 200 if updating informations successfully when no cache. | ||
2. ✅ Returns if updating informations successfully when hascache. | ||
|
||
> ## Negative case | ||
1. ✅ Returns error 400 if if there is any error when finding the information by information id. | ||
|
||
> ## 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
Check mark: ✅ | ||
Cross Mark: ❌ | ||
|
||
# deleteReason | ||
|
||
> ## Positive case | ||
1. ✅ Receives a POST request in the **/api/reason/:userId/** route. | ||
2. ✅ Return 200 if delete reason successfully. | ||
|
||
> ## Negative case | ||
1. ✅ Returns 403 when no permission to delete. | ||
2. ✅ Returns 404 when error in finding user Id. | ||
3. ✅ Returns 404 when error in finding reason. | ||
4. ✅ Returns 500 when error in deleting. | ||
|
||
> ## 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
Check mark: ✅ | ||
Cross Mark: ❌ | ||
|
||
# getAllReasons | ||
|
||
> ## Positive case | ||
1. ✅ Receives a GET request in the **/api/reason/:userId** route. | ||
2. ✅ Return 200 if get schedule reason successfully. | ||
|
||
> ## Negative case | ||
1. ✅ Returns 404 when error in finding user by Id. | ||
2. ✅ Returns 400 when any error in fetching the user | ||
|
||
> ## Edge case |
15 changes: 15 additions & 0 deletions
15
requirements/reasonSchedulingController/getSingleReason.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,15 @@ | ||
Check mark: ✅ | ||
Cross Mark: ❌ | ||
|
||
# getSingleReason | ||
|
||
> ## Positive case | ||
1. ✅ Receives a GET request in the **/api/reason/single/:userId** route. | ||
2. ✅ Return 200 if not found schedule reason and return empty object successfully. | ||
3. ✅ Return 200 if found schedule reason and return reason successfully. | ||
|
||
> ## Negative case | ||
1. ✅ Returns 404 when any error in find user by Id | ||
2. ✅ Returns 400 when any error in fetching the user | ||
|
||
> ## 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
Check mark: ✅ | ||
Cross Mark: ❌ | ||
|
||
# patchReason | ||
|
||
> ## Positive case | ||
1. ✅ Receives a POST request in the **/api/breason/** route. | ||
2. ✅ Return 200 if updated schedule reason and send blue sqaure email successfully. | ||
|
||
> ## Negative case | ||
1. ✅ Returns 400 for not providing reason. | ||
2. ✅ Returns 404 when error in finding user Id. | ||
3. ✅ Returns 404 when not finding provided reason. | ||
4. ✅ Returns 400 when any error in saving. | ||
|
||
> ## 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
Check mark: ✅ | ||
Cross Mark: ❌ | ||
|
||
# postReason | ||
|
||
> ## Positive case | ||
1. ✅ Receives a POST request in the **/api/reason/** route. | ||
2. ✅ Return 200 if s dchedule reason and send blue sqaure email successfully. | ||
|
||
> ## Negative case | ||
1. ✅ Returns 400 for warning to choose Sunday. | ||
2. ✅ Returns 400 for warning to choose a funture date. | ||
3. ✅ Returns 400 for not providing reason. | ||
4. ✅ Returns 404 when error in finding user Id. | ||
5. ✅ Returns 403 when duplicate reason to the date. | ||
6. ✅ Returns 400 when any error in saving. | ||
|
||
> ## 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.