From 64ae3244ed7466ef7b345a1ac6ba8d57d370af19 Mon Sep 17 00:00:00 2001 From: konrad Date: Tue, 16 Jan 2018 13:12:37 +0100 Subject: [PATCH] Improved author unit test --- models/author_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/models/author_test.go b/models/author_test.go index 51269a6..8cacc82 100644 --- a/models/author_test.go +++ b/models/author_test.go @@ -32,7 +32,7 @@ func TestAddOrUpdateAuthor(t *testing.T) { } // Get the new author - gotauthor, exists, err := GetAuthorByID(1) + gotauthor, exists, err := GetAuthorByID(author1.ID) assert.NoError(t, err) assert.True(t, exists) assert.Equal(t, gotauthor.Forename, testauthor.Forename) @@ -42,7 +42,7 @@ func TestAddOrUpdateAuthor(t *testing.T) { assert.Error(t, err) // Update the author - testauthor.ID = 1 + testauthor.ID = author1.ID testauthor.Forename = "Lorem Ipsum" author1updated, err := AddOrUpdateAuthor(testauthor) assert.NoError(t, err)