summaryrefslogtreecommitdiffstats
path: root/models/issue_test.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2019-10-08 10:57:41 +0800
committerGitHub <noreply@github.com>2019-10-08 10:57:41 +0800
commit78438d310be42f9c5e0e2937ee54e6050cc8f381 (patch)
tree235c28d5bd22d38dcf70dd5d4eb8c412f66899ac /models/issue_test.go
parent1a269f7ef81b1a7865c4679b91a4037059ad4938 (diff)
downloadgitea-78438d310be42f9c5e0e2937ee54e6050cc8f381.tar.gz
gitea-78438d310be42f9c5e0e2937ee54e6050cc8f381.zip
Fix issues/pr list broken when there are many repositories (#8409)
* fix issues/pr list broken when there are many repositories * remove unused codes * fix counting error on issues/prs * keep the old logic * fix panic * fix tests
Diffstat (limited to 'models/issue_test.go')
-rw-r--r--models/issue_test.go11
1 files changed, 7 insertions, 4 deletions
diff --git a/models/issue_test.go b/models/issue_test.go
index 9cd9ff0ad9..65f4d6ba66 100644
--- a/models/issue_test.go
+++ b/models/issue_test.go
@@ -10,6 +10,7 @@ import (
"time"
"github.com/stretchr/testify/assert"
+ "xorm.io/builder"
)
func TestIssue_ReplaceLabels(t *testing.T) {
@@ -266,10 +267,12 @@ func TestGetUserIssueStats(t *testing.T) {
},
{
UserIssueStatsOptions{
- UserID: 2,
- UserRepoIDs: []int64{1, 2},
- FilterMode: FilterModeAll,
- IsClosed: true,
+ UserID: 2,
+ RepoSubQuery: builder.Select("repository.id").
+ From("repository").
+ Where(builder.In("repository.id", []int64{1, 2})),
+ FilterMode: FilterModeAll,
+ IsClosed: true,
},
IssueStats{
YourRepositoriesCount: 2,