diff options
author | 6543 <6543@obermui.de> | 2022-04-25 16:06:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-25 16:06:24 +0200 |
commit | ddbbe6e15ce411a286c2c9ea4e9fb4107fe3cde5 (patch) | |
tree | 9ec29e551b0a06a3cbc2027aa968d5fc06883a6b /models/issue_test.go | |
parent | fe274c148bc516b63aa89ab1904d124e60903421 (diff) | |
download | gitea-ddbbe6e15ce411a286c2c9ea4e9fb4107fe3cde5.tar.gz gitea-ddbbe6e15ce411a286c2c9ea4e9fb4107fe3cde5.zip |
User specific repoID or xorm builder conditions for issue search (#19475)
* extend models.IssuesOptions to have more specific repo filter options
* use new options
* unrelated refactor
* rm RepoIDs
Diffstat (limited to 'models/issue_test.go')
-rw-r--r-- | models/issue_test.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/models/issue_test.go b/models/issue_test.go index 7893df8a7f..19e1295264 100644 --- a/models/issue_test.go +++ b/models/issue_test.go @@ -21,6 +21,7 @@ import ( user_model "code.gitea.io/gitea/models/user" "github.com/stretchr/testify/assert" + "xorm.io/builder" ) func TestIssue_ReplaceLabels(t *testing.T) { @@ -157,7 +158,7 @@ func TestIssues(t *testing.T) { }, { IssuesOptions{ - RepoIDs: []int64{1, 3}, + RepoCond: builder.In("repo_id", 1, 3), SortType: "oldest", ListOptions: db.ListOptions{ Page: 1, @@ -344,7 +345,7 @@ func TestGetRepoIDsForIssuesOptions(t *testing.T) { }, { IssuesOptions{ - RepoIDs: []int64{1, 2}, + RepoCond: builder.In("repo_id", 1, 2), }, []int64{1, 2}, }, |