-
Notifications
You must be signed in to change notification settings - Fork 30
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 #954 from OneCommunityGlobal/Ivy-rolePresetsContro…
…ller-unit-test Ivy-rolePresetsController-create-delete-update-get-test-integration
- Loading branch information
Showing
7 changed files
with
754 additions
and
5 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,18 @@ | ||
Check mark: ✅ | ||
Cross Mark: ❌ | ||
|
||
# createNewPreset | ||
|
||
> ## Positive case | ||
1. ✅ Receives a POST request in the **/api/rolePreset** route | ||
2. ✅ Return 201 if create New Presets successfully. | ||
|
||
> ## Negative case | ||
1. ✅ Returns error 403 if user doesn't have permissions for putRole | ||
2. ✅ Returns 400 if missing presetName | ||
3. ✅ Returns 400 if missing roleName | ||
4. ✅ Returns 400 if missing premissions | ||
5. ✅ Returns error 400 when saving new presets | ||
|
||
> ## 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,17 @@ | ||
Check mark: ✅ | ||
Cross Mark: ❌ | ||
|
||
# deletePresetById | ||
|
||
> ## Positive case | ||
1. ✅ Return 200 if removing preset by id successfully. | ||
|
||
> ## Negative case | ||
1. ✅ Returns error 403 if user doesn't have permissions for putRole | ||
2. ✅ Returns 400 if error in finding by id | ||
3. ✅ Returns 400 if the route doesn't exist | ||
4. ✅ Returns 400 if any error when removing results | ||
|
||
> ## 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,15 @@ | ||
Check mark: ✅ | ||
Cross Mark: ❌ | ||
|
||
# getPresetsByRole | ||
|
||
> ## Positive case | ||
1. ✅ Receives a GET request in the **/api/rolePreset** route | ||
2. ✅ Return 200 if get Presets by roleName successfully. | ||
|
||
> ## Negative case | ||
1. ✅ Returns error 403 if user doesn't have permissions for putRole | ||
2. ✅ Returns 400 when catching any error in finding roleName | ||
|
||
> ## 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,17 @@ | ||
Check mark: ✅ | ||
Cross Mark: ❌ | ||
|
||
# updatePresetById | ||
|
||
> ## Positive case | ||
1. ✅ Return 200 if update preset by id successfully. | ||
|
||
> ## Negative case | ||
1. ✅ Returns error 403 if user doesn't have permissions for putRole | ||
2. ✅ Returns 400 if the router doesn't exist | ||
3. ✅ Returns 400 if error in finding by id | ||
3. ✅ Returns 400 if any error when saving results | ||
|
||
> ## 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.