forked from forgejo/forgejo
[MODERATION] Purge issues on user deletion (squash) revert shared fixtures workarounds
(cherry picked from commit7224653a40
) (cherry picked from commitaa6e8672f9
) (cherry picked from commit58c7947e95
) (cherry picked from commit149f6b3533
)
This commit is contained in:
parent
9af6e03aab
commit
65e65e04f3
5 changed files with 18 additions and 18 deletions
|
@ -370,7 +370,7 @@ func TestAPISearchIssues(t *testing.T) {
|
|||
token := getUserToken(t, "user2", auth_model.AccessTokenScopeReadIssue)
|
||||
|
||||
// as this API was used in the frontend, it uses UI page size
|
||||
expectedIssueCount := 19 // from the fixtures
|
||||
expectedIssueCount := 18 // from the fixtures
|
||||
if expectedIssueCount > setting.UI.IssuePagingNum {
|
||||
expectedIssueCount = setting.UI.IssuePagingNum
|
||||
}
|
||||
|
@ -394,7 +394,7 @@ func TestAPISearchIssues(t *testing.T) {
|
|||
req = NewRequest(t, "GET", link.String())
|
||||
resp = MakeRequest(t, req, http.StatusOK)
|
||||
DecodeJSON(t, resp, &apiIssues)
|
||||
assert.Len(t, apiIssues, 12)
|
||||
assert.Len(t, apiIssues, 11)
|
||||
query.Del("since")
|
||||
query.Del("before")
|
||||
|
||||
|
@ -410,7 +410,7 @@ func TestAPISearchIssues(t *testing.T) {
|
|||
req = NewRequest(t, "GET", link.String())
|
||||
resp = MakeRequest(t, req, http.StatusOK)
|
||||
DecodeJSON(t, resp, &apiIssues)
|
||||
assert.EqualValues(t, "21", resp.Header().Get("X-Total-Count"))
|
||||
assert.EqualValues(t, "20", resp.Header().Get("X-Total-Count"))
|
||||
assert.Len(t, apiIssues, 20)
|
||||
|
||||
query.Add("limit", "10")
|
||||
|
@ -418,7 +418,7 @@ func TestAPISearchIssues(t *testing.T) {
|
|||
req = NewRequest(t, "GET", link.String())
|
||||
resp = MakeRequest(t, req, http.StatusOK)
|
||||
DecodeJSON(t, resp, &apiIssues)
|
||||
assert.EqualValues(t, "21", resp.Header().Get("X-Total-Count"))
|
||||
assert.EqualValues(t, "20", resp.Header().Get("X-Total-Count"))
|
||||
assert.Len(t, apiIssues, 10)
|
||||
|
||||
query = url.Values{"assigned": {"true"}, "state": {"all"}, "token": {token}}
|
||||
|
@ -468,7 +468,7 @@ func TestAPISearchIssuesWithLabels(t *testing.T) {
|
|||
defer tests.PrepareTestEnv(t)()
|
||||
|
||||
// as this API was used in the frontend, it uses UI page size
|
||||
expectedIssueCount := 19 // from the fixtures
|
||||
expectedIssueCount := 18 // from the fixtures
|
||||
if expectedIssueCount > setting.UI.IssuePagingNum {
|
||||
expectedIssueCount = setting.UI.IssuePagingNum
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue