Skip to content

Commit ce613be

Browse files
committed
follow @wxiaoguang review
1 parent 2cf0cf0 commit ce613be

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/integration/empty_repo_test.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ import (
1111
"code.gitea.io/gitea/models/unittest"
1212
user_model "code.gitea.io/gitea/models/user"
1313
"code.gitea.io/gitea/tests"
14+
15+
"github.com/stretchr/testify/assert"
1416
)
1517

1618
func TestEmptyRepo(t *testing.T) {
@@ -21,7 +23,8 @@ func TestEmptyRepo(t *testing.T) {
2123
"commit/1ae57b34ccf7e18373",
2224
"graph",
2325
}
24-
emptyRepo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{}, unittest.Cond("is_empty = ?", true))
26+
emptyRepo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 5})
27+
assert.True(t, emptyRepo.IsEmpty)
2528
owner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: emptyRepo.OwnerID})
2629
for _, subpath := range subpaths {
2730
req := NewRequestf(t, "GET", "/%s/%s/%s", owner.Name, emptyRepo.Name, subpath)

0 commit comments

Comments
 (0)