// Copyright 2020 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT

package issues_test

import (
	"testing"

	issues_model "code.mokoconsulting.tech/MokoConsulting/MokoGitea/models/issues"
	"code.mokoconsulting.tech/MokoConsulting/MokoGitea/models/unittest"

	_ "code.mokoconsulting.tech/MokoConsulting/MokoGitea/models"
	_ "code.mokoconsulting.tech/MokoConsulting/MokoGitea/models/actions"
	_ "code.mokoconsulting.tech/MokoConsulting/MokoGitea/models/activities"
	_ "code.mokoconsulting.tech/MokoConsulting/MokoGitea/models/repo"
	_ "code.mokoconsulting.tech/MokoConsulting/MokoGitea/models/user"

	"github.com/stretchr/testify/assert"
)

func TestFixturesAreConsistent(t *testing.T) {
	assert.NoError(t, unittest.PrepareTestDatabase())
	unittest.CheckConsistencyFor(t,
		&issues_model.Issue{},
		&issues_model.PullRequest{},
		&issues_model.Milestone{},
		&issues_model.Label{},
	)
}

func TestMain(m *testing.M) {
	unittest.MainTest(m)
}
