mirror of
https://codeberg.org/forgejo/forgejo
synced 2024-11-29 13:16:10 +01:00
Do requested changes
This commit is contained in:
parent
dbb331fde0
commit
87a7b61d7f
|
@ -203,7 +203,7 @@ func GetPrimaryEmailAddressOfUser(ctx context.Context, uid int64) (*EmailAddress
|
|||
}
|
||||
|
||||
// Deletes the primary email address of the user
|
||||
// This is only alllowed if the user is a organization
|
||||
// This is only allowed if the user is a organization
|
||||
func DeletePrimaryEmailAddressOfUser(ctx context.Context, uid int64) error {
|
||||
user, err := GetUserByID(ctx, uid)
|
||||
if err != nil {
|
||||
|
|
|
@ -52,6 +52,8 @@ func TestOrgSettingsChangeEmail(t *testing.T) {
|
|||
token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeReadOrganization)
|
||||
|
||||
t.Run("Invalid", func(t *testing.T) {
|
||||
defer tests.PrintCurrentTest(t)()
|
||||
|
||||
settings := getOrgSettingsFormData(t, session, orgName)
|
||||
|
||||
settings["email"] = "invalid"
|
||||
|
@ -62,6 +64,8 @@ func TestOrgSettingsChangeEmail(t *testing.T) {
|
|||
})
|
||||
|
||||
t.Run("Valid", func(t *testing.T) {
|
||||
defer tests.PrintCurrentTest(t)()
|
||||
|
||||
settings := getOrgSettingsFormData(t, session, orgName)
|
||||
|
||||
settings["email"] = "example@example.com"
|
||||
|
@ -72,6 +76,8 @@ func TestOrgSettingsChangeEmail(t *testing.T) {
|
|||
})
|
||||
|
||||
t.Run("Empty", func(t *testing.T) {
|
||||
defer tests.PrintCurrentTest(t)()
|
||||
|
||||
settings := getOrgSettingsFormData(t, session, orgName)
|
||||
|
||||
settings["email"] = ""
|
||||
|
|
Loading…
Reference in a new issue