Remove invalid test

This commit is contained in:
2022-04-05 16:25:34 +00:00
parent 2feefea737
commit 4332a1537b
2 changed files with 3 additions and 23 deletions

View File

@ -19,7 +19,7 @@ func init() { //nolint:gochecknoinits
txdb.Register("pgtx", "pgx", "postgres://budgeteer:budgeteer@db:5432/budgeteer_test")
}
func TestRegisterUser(t *testing.T) { //nolint:funlen
func TestRegisterUser(t *testing.T) {
t.Parallel()
database, err := postgres.Connect("pgtx", "example")
if err != nil {
@ -66,22 +66,4 @@ func TestRegisterUser(t *testing.T) { //nolint:funlen
t.Error("Did not get a token")
}
})
t.Run("GetTransactions", func(t *testing.T) {
t.Parallel()
context.Request, err = http.NewRequest(http.MethodGet, "/account/accountid/transactions", nil)
if recorder.Code != http.StatusOK {
t.Errorf("handler returned wrong status code: got %v want %v", recorder.Code, http.StatusOK)
}
var response TransactionsResponse
err = json.NewDecoder(recorder.Body).Decode(&response)
if err != nil {
t.Error(err.Error())
t.Error("Error retreiving list of transactions.")
}
if len(response.Transactions) == 0 {
t.Error("Did not get any transactions.")
}
})
}