dev env with a seed

This commit is contained in:
bronku 2026-06-11 09:23:26 +02:00
parent 5f2d6f00bc
commit 07b58db5d9
3 changed files with 87 additions and 5 deletions

View file

@ -59,12 +59,12 @@ func TestStore(t *testing.T) {
t.Error("error updating cake", err)
}
// Update Non-existing Cake
// Update Non-existing Cake — UPDATE on missing ID is a no-op, not an error
var updatedCake models.Cake
updatedCake.ID = 10
_, err = s.SaveCake(updatedCake)
if err == nil {
t.Error("did not return an error when attempted to update non existent cake")
if err != nil {
t.Errorf("unexpected error updating non-existent cake: %v", err)
}
// get cakes