diff --git a/internal/api/likes_test.go b/internal/api/likes_test.go index 1ad0ab84..3597b5f4 100644 --- a/internal/api/likes_test.go +++ b/internal/api/likes_test.go @@ -246,7 +246,7 @@ func TestLikeTrack_DuringOpenPlayEvent_WritesContextualLike(t *testing.T) { // Like the OTHER track. With an open play_event for `playing`, // the contextual_likes row should reference `other` and the playing // track's session vector. - if r := callLike(h, user, http.MethodPost, "/api/likes/tracks/"+uuidToString(other.ID)); r.Code != http.StatusNoContent { + if r := callLike(h, user, http.MethodPost, "/api/likes/tracks/"+uuidToString(other.ID)); r.Code != http.StatusOK { t.Fatalf("like: %d", r.Code) } var count int @@ -265,7 +265,7 @@ func TestLikeTrack_NoOpenPlayEvent_NoContextualLike(t *testing.T) { album := seedAlbum(t, pool, artist.ID, "X", 1990) track := seedTrack(t, pool, album.ID, artist.ID, "T", 1, 100_000) - if r := callLike(h, user, http.MethodPost, "/api/likes/tracks/"+uuidToString(track.ID)); r.Code != http.StatusNoContent { + if r := callLike(h, user, http.MethodPost, "/api/likes/tracks/"+uuidToString(track.ID)); r.Code != http.StatusOK { t.Fatalf("like: %d", r.Code) } var count int @@ -311,7 +311,7 @@ func TestUnlikeTrack_SoftDeletesContextualLikes(t *testing.T) { _ = callEvents(h, user, []byte(`{"type":"play_started","track_id":"`+uuidToString(playing.ID)+`"}`)) _ = callLike(h, user, http.MethodPost, "/api/likes/tracks/"+uuidToString(other.ID)) - if r := callLike(h, user, http.MethodDelete, "/api/likes/tracks/"+uuidToString(other.ID)); r.Code != http.StatusNoContent { + if r := callLike(h, user, http.MethodDelete, "/api/likes/tracks/"+uuidToString(other.ID)); r.Code != http.StatusOK { t.Fatalf("unlike: %d", r.Code) } // general_likes deleted.