Get() methods from all repositories now return a ErrNotFound when the id is nonexistent
This commit is contained in:
@@ -43,5 +43,8 @@ func (m *MockArtist) Get(id string) (*domain.Artist, error) {
|
||||
if m.err {
|
||||
return nil, errors.New("Error!")
|
||||
}
|
||||
return m.data[id], nil
|
||||
if d, ok := m.data[id]; ok {
|
||||
return d, nil
|
||||
}
|
||||
return nil, domain.ErrNotFound
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user