Skip to content

Commit

Permalink
Merge pull request go-gitea#1875 from ethantkoenig/test/unused
Browse files Browse the repository at this point in the history
Run unused test
  • Loading branch information
andreynering authored Jun 4, 2017
2 parents e7ae13d + 9f9289f commit 858126b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
8 changes: 8 additions & 0 deletions models/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,16 @@ import (
"testing"

"code.gitea.io/gitea/modules/setting"

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

// TestFixturesAreConsistent assert that test fixtures are consistent
func TestFixturesAreConsistent(t *testing.T) {
assert.NoError(t, PrepareTestDatabase())
CheckConsistencyForAll(t)
}

func TestMain(m *testing.M) {
if err := CreateTestEngine(); err != nil {
fmt.Printf("Error creating test engine: %v\n", err)
Expand Down
6 changes: 0 additions & 6 deletions models/unit_tests.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,6 @@ func CreateTestEngine() error {
return InitFixtures(&testfixtures.SQLite{}, "fixtures/")
}

// TestFixturesAreConsistent assert that test fixtures are consistent
func TestFixturesAreConsistent(t *testing.T) {
assert.NoError(t, PrepareTestDatabase())
CheckConsistencyForAll(t)
}

// PrepareTestDatabase load test fixtures into test database
func PrepareTestDatabase() error {
return LoadFixtures()
Expand Down

0 comments on commit 858126b

Please sign in to comment.