From 2246a4bff9b30e03dfeac5902069b428e2ab26f4 Mon Sep 17 00:00:00 2001 From: Aaron Lindsay Date: Mon, 23 Oct 2017 05:49:26 -0400 Subject: [PATCH] testing: Add more test data --- internal/handlers/testdata_test.go | 35 +++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/internal/handlers/testdata_test.go b/internal/handlers/testdata_test.go index d320220..db420bb 100644 --- a/internal/handlers/testdata_test.go +++ b/internal/handlers/testdata_test.go @@ -143,6 +143,13 @@ var data = []TestData{ Password: "hunter2", Email: "jsmith@example.com", }, + User{ + DefaultCurrency: 978, // Euro + Name: "Billy Bob", + Username: "bbob6", + Password: "#)$&!KF(*ADAHK#@*(FAJSDkalsdf98af32klhf98sd8a'2938LKJD", + Email: "bbob+moneygo@my-domain.com", + }, }, securities: []handlers.Security{ handlers.Security{ @@ -193,11 +200,18 @@ var data = []TestData{ Type: handlers.Expense, Name: "Groceries", }, + handlers.Account{ + UserId: 0, + SecurityId: 0, + ParentAccountId: 2, + Type: handlers.Expense, + Name: "Cable", + }, }, transactions: []handlers.Transaction{ handlers.Transaction{ UserId: 0, - Description: "blah", + Description: "weekly groceries", Date: time.Date(2017, time.October, 15, 1, 16, 59, 0, time.UTC), Splits: []*handlers.Split{ &handlers.Split{ @@ -214,6 +228,25 @@ var data = []TestData{ }, }, }, + handlers.Transaction{ + UserId: 0, + Description: "Cable", + Date: time.Date(2017, time.September, 1, 0, 00, 00, 0, time.UTC), + Splits: []*handlers.Split{ + &handlers.Split{ + Status: handlers.Reconciled, + AccountId: 1, + SecurityId: -1, + Amount: "-39.99", + }, + &handlers.Split{ + Status: handlers.Entered, + AccountId: 4, + SecurityId: -1, + Amount: "39.99", + }, + }, + }, }, }, }