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