-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix a misleading error if the backend does not have correct groups
If the portal's default groups aren't present on the backend dev environment the current ItemNotFound error is very confusing. Log an error in this case to the console and return 500 instead of 404. Fixes #1369
- Loading branch information
Showing
4 changed files
with
14 additions
and
6 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
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 |
---|---|---|
|
@@ -106,6 +106,13 @@ class SignupSpec extends IntegrationTestRunner { | |
} | ||
} | ||
|
||
"give a 500 error if defaultGroups not present in DB" in new ITestApp( | ||
specificConfig = Map("ehri.portal.defaultUserGroups" -> Seq("BAD_GROUP"))) { | ||
val signup = FakeRequest(accountRoutes.signupPost()).withCsrf.callWith(data) | ||
status(signup) must equalTo(INTERNAL_SERVER_ERROR) | ||
} | ||
|
||
|
||
"allow log in after sign up" in new ITestApp { | ||
val testEmail2 = "[email protected]" | ||
val data2 = data.updated(SignupData.EMAIL, Seq(testEmail2)) | ||
|