Improved author unit test

This commit is contained in:
konrad 2018-01-16 13:12:37 +01:00 committed by kolaente
parent ac78d311a8
commit 64ae3244ed
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 2 additions and 2 deletions

View File

@ -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)