Implement integration-test based on YNAB-Export #46

Merged
jacob1123 merged 24 commits from integration-test into master 2022-04-06 21:26:47 +02:00
Showing only changes of commit 49d96be1e3 - Show all commits

View File

@ -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 {