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)