dev env with a seed
This commit is contained in:
parent
5f2d6f00bc
commit
07b58db5d9
3 changed files with 87 additions and 5 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue