We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7fc5ebe commit 4d237b0Copy full SHA for 4d237b0
internal/controllers/account_test.go
@@ -33,7 +33,7 @@ func TestGetAccounts(t *testing.T) {
33
}
34
35
assert.Equal(t, 200, recorder.Code)
36
- assert.Equal(t, 3, len(response.Data))
+ assert.Len(t, response.Data, 3)
37
38
bankAccount := response.Data[0]
39
assert.Equal(t, uint64(1), bankAccount.BudgetID)
@@ -136,7 +136,7 @@ func TestGetAccountTransactions(t *testing.T) {
136
137
138
139
140
141
142
func TestGetAccountTransactionsNonExistingAccount(t *testing.T) {
@@ -149,7 +149,7 @@ func TestGetAccountTransactionsNonExistingAccount(t *testing.T) {
149
150
151
assert.Equal(t, 404, recorder.Code)
152
- assert.Equal(t, 0, len(response.Data))
+ assert.Len(t, response.Data, 0)
153
154
155
func TestUpdateAccount(t *testing.T) {
internal/controllers/allocation_test.go
@@ -33,7 +33,7 @@ func TestGetAllocations(t *testing.T) {
assert.Equal(t, uint64(1), response.Data[0].EnvelopeID)
assert.Equal(t, uint8(1), response.Data[0].Month)
assert.Equal(t, uint(2022), response.Data[0].Year)
internal/controllers/budget_test.go
@@ -32,7 +32,7 @@ func TestGetBudgets(t *testing.T) {
32
- assert.Equal(t, 1, len(response.Data))
+ assert.Len(t, response.Data, 1)
assert.Equal(t, "Testing Budget", response.Data[0].Name)
assert.Equal(t, "GNU: Terry Pratchett", response.Data[0].Note)
internal/controllers/category_test.go
@@ -32,7 +32,7 @@ func TestGetCategories(t *testing.T) {
assert.Equal(t, uint64(1), response.Data[0].BudgetID)
assert.Equal(t, "Running costs", response.Data[0].Name)
assert.Equal(t, "For e.g. groceries and energy bills", response.Data[0].Note)
internal/controllers/envelope_test.go
@@ -32,7 +32,7 @@ func TestGetEnvelopes(t *testing.T) {
assert.Equal(t, uint64(1), response.Data[0].CategoryID)
assert.Equal(t, "Utilities", response.Data[0].Name)
assert.Equal(t, "Energy & Water", response.Data[0].Note)
internal/controllers/transaction_test.go
@@ -33,7 +33,7 @@ func TestGetTransactions(t *testing.T) {
januaryTransaction := response.Data[0]
assert.Equal(t, uint64(1), januaryTransaction.BudgetID)
0 commit comments