summaryrefslogtreecommitdiffstats
path: root/models/issue_test.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2021-06-10 08:08:19 +0800
committerGitHub <noreply@github.com>2021-06-10 02:08:19 +0200
commit179c727b4f4475c29a882502c8d7084aaf633900 (patch)
treea583252523acff05c10a3213b11004e146340696 /models/issue_test.go
parent5fef041079d8524537e24e8afc5d2b8c2579600c (diff)
downloadgitea-179c727b4f4475c29a882502c8d7084aaf633900.tar.gz
gitea-179c727b4f4475c29a882502c8d7084aaf633900.zip
Fix bug on getIssueIDsByRepoID (#16119)
* Fix bug on getIssueIDsByRepoID * Add test
Diffstat (limited to 'models/issue_test.go')
-rw-r--r--models/issue_test.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/models/issue_test.go b/models/issue_test.go
index c21b1d6ae9..b612ab267b 100644
--- a/models/issue_test.go
+++ b/models/issue_test.go
@@ -36,6 +36,14 @@ func TestIssue_ReplaceLabels(t *testing.T) {
testSuccess(1, []int64{})
}
+func Test_GetIssueIDsByRepoID(t *testing.T) {
+ assert.NoError(t, PrepareTestDatabase())
+
+ ids, err := GetIssueIDsByRepoID(1)
+ assert.NoError(t, err)
+ assert.Len(t, ids, 5)
+}
+
func TestIssueAPIURL(t *testing.T) {
assert.NoError(t, PrepareTestDatabase())
issue := AssertExistsAndLoadBean(t, &Issue{ID: 1}).(*Issue)