Extract function
This commit is contained in:
parent
8df7968175
commit
49d96be1e3
@ -87,6 +87,12 @@ func TestMain(t *testing.T) {
|
||||
|
||||
loc := time.Now().Location()
|
||||
|
||||
AssertCategoriesAndAvailableEqual(t, loc, handler, ctx, budget)
|
||||
|
||||
// check accounts
|
||||
}
|
||||
|
||||
func AssertCategoriesAndAvailableEqual(t *testing.T, loc *time.Location, handler *Handler, ctx context.Context, budget *postgres.Budget) {
|
||||
resultDir := "../testdata/production-export/results"
|
||||
files, err := os.ReadDir(resultDir)
|
||||
if err != nil {
|
||||
@ -108,10 +114,6 @@ func TestMain(t *testing.T) {
|
||||
testCaseFile := filepath.Join(resultDir, file.Name())
|
||||
handler.CheckAvailableBalance(ctx, t, testCaseFile, budget, first)
|
||||
}
|
||||
|
||||
// check categories
|
||||
|
||||
// check accounts
|
||||
}
|
||||
|
||||
type TestData struct {
|
||||
|
Loading…
x
Reference in New Issue
Block a user