2017-02-06 08:18:36 -07:00
|
|
|
// Copyright 2017 The Gitea Authors. All rights reserved.
|
2022-11-27 11:20:29 -07:00
|
|
|
// SPDX-License-Identifier: MIT
|
2017-02-06 08:18:36 -07:00
|
|
|
|
|
|
|
package models
|
2016-04-22 15:28:08 -07:00
|
|
|
|
|
|
|
import (
|
2016-07-08 22:22:28 -07:00
|
|
|
"testing"
|
2016-04-22 15:28:08 -07:00
|
|
|
|
2021-09-19 04:49:59 -07:00
|
|
|
"code.gitea.io/gitea/models/db"
|
2021-11-12 07:36:47 -07:00
|
|
|
"code.gitea.io/gitea/models/unittest"
|
2017-02-06 08:18:36 -07:00
|
|
|
|
2017-06-06 06:53:16 -07:00
|
|
|
"github.com/stretchr/testify/assert"
|
2016-04-22 15:28:08 -07:00
|
|
|
)
|
|
|
|
|
2022-01-17 11:31:58 -07:00
|
|
|
func TestCheckRepoStats(t *testing.T) {
|
|
|
|
assert.NoError(t, unittest.PrepareTestDatabase())
|
|
|
|
assert.NoError(t, CheckRepoStats(db.DefaultContext))
|
|
|
|
}
|
|
|
|
|
2020-07-07 12:16:34 -07:00
|
|
|
func TestDoctorUserStarNum(t *testing.T) {
|
2021-11-12 07:36:47 -07:00
|
|
|
assert.NoError(t, unittest.PrepareTestDatabase())
|
2020-07-07 12:16:34 -07:00
|
|
|
|
2023-10-10 21:24:07 -07:00
|
|
|
assert.NoError(t, DoctorUserStarNum(db.DefaultContext))
|
2020-07-07 12:16:34 -07:00
|
|
|
}
|