code.gitea.io/gitea@v1.21.7/models/main_test.go (about) 1 // Copyright 2020 The Gitea Authors. All rights reserved. 2 // SPDX-License-Identifier: MIT 3 4 package models 5 6 import ( 7 "testing" 8 9 activities_model "code.gitea.io/gitea/models/activities" 10 "code.gitea.io/gitea/models/organization" 11 repo_model "code.gitea.io/gitea/models/repo" 12 "code.gitea.io/gitea/models/unittest" 13 user_model "code.gitea.io/gitea/models/user" 14 15 _ "code.gitea.io/gitea/models/actions" 16 _ "code.gitea.io/gitea/models/system" 17 18 "github.com/stretchr/testify/assert" 19 ) 20 21 // TestFixturesAreConsistent assert that test fixtures are consistent 22 func TestFixturesAreConsistent(t *testing.T) { 23 assert.NoError(t, unittest.PrepareTestDatabase()) 24 unittest.CheckConsistencyFor(t, 25 &user_model.User{}, 26 &repo_model.Repository{}, 27 &organization.Team{}, 28 &activities_model.Action{}) 29 } 30 31 func TestMain(m *testing.M) { 32 unittest.MainTest(m, &unittest.TestOptions{ 33 GiteaRootPath: "..", 34 }) 35 }