Backend: Update TestPhoto_Save test

Signed-off-by: Michael Mayer <michael@liquidbytes.net>
This commit is contained in:
Michael Mayer 2020-05-19 12:51:19 +02:00
parent 27ea0cb214
commit a785a9d708

View file

@ -70,8 +70,6 @@ func TestSavePhotoForm(t *testing.T) {
} }
func TestPhoto_Save(t *testing.T) { func TestPhoto_Save(t *testing.T) {
/* Creating new photos with Save() not supported (yet)
t.Run("new photo", func(t *testing.T) { t.Run("new photo", func(t *testing.T) {
photo := Photo{ photo := Photo{
ID: 11111, ID: 11111,
@ -103,11 +101,9 @@ func TestPhoto_Save(t *testing.T) {
} }
err := photo.Save() err := photo.Save()
if err != nil {
t.Fatal(err) assert.EqualError(t, err, "photo: can't save to database, id is empty")
}
}) })
*/
t.Run("existing photo", func(t *testing.T) { t.Run("existing photo", func(t *testing.T) {
m := PhotoFixtures.Get("19800101_000002_D640C559") m := PhotoFixtures.Get("19800101_000002_D640C559")