From 695294fc582bc5724ea47cce3ea45c74f334b66e Mon Sep 17 00:00:00 2001 From: Theresa Gresch Date: Fri, 8 May 2020 14:31:58 +0200 Subject: [PATCH] Backend: Improve photo_label_test --- internal/api/photo_label_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/api/photo_label_test.go b/internal/api/photo_label_test.go index 15261ca1d..ecdca45aa 100644 --- a/internal/api/photo_label_test.go +++ b/internal/api/photo_label_test.go @@ -57,7 +57,8 @@ func TestRemovePhotoLabel(t *testing.T) { RemovePhotoLabel(router, ctx) r := PerformRequest(app, "DELETE", "/api/v1/photos/pt9jtdre2lvl0yh7/label/1000002") assert.Equal(t, http.StatusOK, r.Code) - assert.NotContains(t, r.Body.String(), "cake") + val := gjson.Get(r.Body.String(), "Labels") + assert.NotContains(t, val.String(), "cake") }) t.Run("photo not found", func(t *testing.T) { app, router, ctx := NewApiTest()