Skip to content

Commit

Permalink
ensure newly created user is set to restricted
Browse files Browse the repository at this point in the history
  • Loading branch information
rjnienaber committed Jul 6, 2021
1 parent 50cfd70 commit 607ccd4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions integrations/signup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
package integrations

import (
"code.gitea.io/gitea/models"
"fmt"
"net/http"
"strings"
Expand Down Expand Up @@ -50,6 +51,9 @@ func TestSignupAsRestricted(t *testing.T) {
// should be able to view new user's page
req = NewRequest(t, "GET", "/restrictedUser")
MakeRequest(t, req, http.StatusOK)

user2 := models.AssertExistsAndLoadBean(t, &models.User{Name: "restrictedUser"}).(*models.User)
assert.True(t, user2.IsRestricted)
}

func TestSignupEmail(t *testing.T) {
Expand Down

0 comments on commit 607ccd4

Please sign in to comment.