You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

main_test.go 894B

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