mirror of
https://github.com/go-gitea/gitea.git
synced 2025-07-26 11:04:27 -04:00
Fix lint
This commit is contained in:
parent
01a0b8af2d
commit
49e9ab0039
@ -5,6 +5,7 @@ package v1_25 //nolint
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"code.gitea.io/gitea/modules/timeutil"
|
"code.gitea.io/gitea/modules/timeutil"
|
||||||
|
|
||||||
"xorm.io/xorm"
|
"xorm.io/xorm"
|
||||||
"xorm.io/xorm/schemas"
|
"xorm.io/xorm/schemas"
|
||||||
)
|
)
|
||||||
|
@ -11,6 +11,7 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
activities_model "code.gitea.io/gitea/models/activities"
|
||||||
"code.gitea.io/gitea/models/db"
|
"code.gitea.io/gitea/models/db"
|
||||||
git_model "code.gitea.io/gitea/models/git"
|
git_model "code.gitea.io/gitea/models/git"
|
||||||
"code.gitea.io/gitea/models/renderhelper"
|
"code.gitea.io/gitea/models/renderhelper"
|
||||||
@ -31,7 +32,6 @@ import (
|
|||||||
"code.gitea.io/gitea/services/context/upload"
|
"code.gitea.io/gitea/services/context/upload"
|
||||||
"code.gitea.io/gitea/services/forms"
|
"code.gitea.io/gitea/services/forms"
|
||||||
release_service "code.gitea.io/gitea/services/release"
|
release_service "code.gitea.io/gitea/services/release"
|
||||||
activities_model "code.gitea.io/gitea/models/activities"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -252,13 +252,13 @@ func TestAPICommitNotification(t *testing.T) {
|
|||||||
|
|
||||||
req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/contents/new_commit_notification.txt", user2.Name, repo1.Name), &createFileOptions).
|
req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/contents/new_commit_notification.txt", user2.Name, repo1.Name), &createFileOptions).
|
||||||
AddTokenAuth(token1)
|
AddTokenAuth(token1)
|
||||||
resp := MakeRequest(t, req, http.StatusCreated)
|
MakeRequest(t, req, http.StatusCreated)
|
||||||
|
|
||||||
// Check notifications are as expected
|
// Check notifications are as expected
|
||||||
token2 := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteNotification)
|
token2 := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteNotification)
|
||||||
req = NewRequest(t, "GET", "/api/v1/notifications?all=true").
|
req = NewRequest(t, "GET", "/api/v1/notifications?all=true").
|
||||||
AddTokenAuth(token2)
|
AddTokenAuth(token2)
|
||||||
resp = MakeRequest(t, req, http.StatusOK)
|
resp := MakeRequest(t, req, http.StatusOK)
|
||||||
var apiNL []api.NotificationThread
|
var apiNL []api.NotificationThread
|
||||||
DecodeJSON(t, resp, &apiNL)
|
DecodeJSON(t, resp, &apiNL)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user