From 0863e5fa5ca78db360d0f445e58803a71142729f Mon Sep 17 00:00:00 2001 From: Aaron Lindsay Date: Fri, 3 Nov 2017 20:54:17 -0400 Subject: [PATCH] testing: Don't omit the 0th elements when testing --- internal/handlers/accounts_test.go | 8 ++++---- internal/handlers/transactions_test.go | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/internal/handlers/accounts_test.go b/internal/handlers/accounts_test.go index c1045d0..62ad26d 100644 --- a/internal/handlers/accounts_test.go +++ b/internal/handlers/accounts_test.go @@ -50,7 +50,7 @@ func deleteAccount(client *http.Client, a *handlers.Account) error { func TestCreateAccount(t *testing.T) { RunWith(t, &data[0], func(t *testing.T, d *TestData) { - for i := 1; i < len(data[0].accounts); i++ { + for i := 0; i < len(data[0].accounts); i++ { orig := data[0].accounts[i] a := d.accounts[i] @@ -69,7 +69,7 @@ func TestCreateAccount(t *testing.T) { func TestGetAccount(t *testing.T) { RunWith(t, &data[0], func(t *testing.T, d *TestData) { - for i := 1; i < len(data[0].accounts); i++ { + for i := 0; i < len(data[0].accounts); i++ { orig := data[0].accounts[i] curr := d.accounts[i] @@ -132,7 +132,7 @@ func TestGetAccounts(t *testing.T) { func TestUpdateAccount(t *testing.T) { RunWith(t, &data[0], func(t *testing.T, d *TestData) { - for i := 1; i < len(data[0].accounts); i++ { + for i := 0; i < len(data[0].accounts); i++ { orig := data[0].accounts[i] curr := d.accounts[i] @@ -196,7 +196,7 @@ func TestUpdateAccount(t *testing.T) { func TestDeleteAccount(t *testing.T) { RunWith(t, &data[0], func(t *testing.T, d *TestData) { - for i := 1; i < len(data[0].accounts); i++ { + for i := 0; i < len(data[0].accounts); i++ { orig := data[0].accounts[i] curr := d.accounts[i] diff --git a/internal/handlers/transactions_test.go b/internal/handlers/transactions_test.go index e22da04..9a43f7e 100644 --- a/internal/handlers/transactions_test.go +++ b/internal/handlers/transactions_test.go @@ -364,7 +364,7 @@ func TestUpdateTransaction(t *testing.T) { func TestDeleteTransaction(t *testing.T) { RunWith(t, &data[0], func(t *testing.T, d *TestData) { - for i := 1; i < len(data[0].transactions); i++ { + for i := 0; i < len(data[0].transactions); i++ { orig := data[0].transactions[i] curr := d.transactions[i]