1
0
mirror of https://github.com/aclindsa/moneygo.git synced 2025-06-30 19:48:38 -04:00

testing: Test fetching all transactions

This commit is contained in:
2017-10-23 21:14:19 -04:00
parent 45b6482b15
commit 09a5cf9a99
2 changed files with 55 additions and 0 deletions

View File

@ -117,6 +117,11 @@ func (tl *TransactionList) Write(w http.ResponseWriter) error {
return enc.Encode(tl)
}
func (tl *TransactionList) Read(json_str string) error {
dec := json.NewDecoder(strings.NewReader(json_str))
return dec.Decode(tl)
}
func (atl *AccountTransactionsList) Write(w http.ResponseWriter) error {
enc := json.NewEncoder(w)
return enc.Encode(atl)