//go:build test

package auth

import (
	"os"
	"testing"

	"crussell/db"
	"crussell/testutils/testdb"
)

func TestMain(m *testing.M) {
	InitJWT("test-secret-key-for-jwt-test")

	pool := testdb.CreateTestDatabase("crussell_test_auth")
	db.Conn = db.NewPoolProxy(pool)

	code := m.Run()
	testdb.DestroyTestDatabase(pool, "crussell_test_auth")
	os.Exit(code)
}
