Remove invalid test
This commit is contained in:
parent
2feefea737
commit
4332a1537b
@ -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.")
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -83,14 +83,12 @@ func (h Handler) CheckAvailableBalance(ctx context.Context, t *testing.T, budget
|
||||
firstOfNextMonth := time.Date(2022, 2, 1, 0, 0, 0, 0, loc)
|
||||
data, err := h.prepareBudgeting(ctx, *budget, firstOfNextMonth, first)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
t.Fail()
|
||||
t.Errorf("prepare budgeting: %s", err)
|
||||
return
|
||||
}
|
||||
|
||||
if data.AvailableBalance.GetFloat64() != -115170.56 {
|
||||
fmt.Println("Available balance is wrong:")
|
||||
t.Fail()
|
||||
t.Errorf("available balance is wrong")
|
||||
return
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user