test(likes): track like and unlike answer 200 with the copies they changed (#8126)
release / web (push) Successful in 1m41s
release / go (push) Successful in 2m5s
release / govulncheck (push) Successful in 20s
release / integration (push) Failing after 4m31s
release / android (push) Successful in 5m2s
release / Build signed APK (push) Successful in 5m34s
release / Attach APK to the Release (tag releases only) (push) Skipped
release / Build + push container image (push) Skipped
release / Verify release artifacts (tag releases only) (push) Skipped
release / web (push) Successful in 1m41s
release / go (push) Successful in 2m5s
release / govulncheck (push) Successful in 20s
release / integration (push) Failing after 4m31s
release / android (push) Successful in 5m2s
release / Build signed APK (push) Successful in 5m34s
release / Attach APK to the Release (tag releases only) (push) Skipped
release / Build + push container image (push) Skipped
release / Verify release artifacts (tag releases only) (push) Skipped
Three more assertions in likes_test.go still expected 204 from the track like and unlike routes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -246,7 +246,7 @@ func TestLikeTrack_DuringOpenPlayEvent_WritesContextualLike(t *testing.T) {
|
|||||||
// Like the OTHER track. With an open play_event for `playing`,
|
// Like the OTHER track. With an open play_event for `playing`,
|
||||||
// the contextual_likes row should reference `other` and the playing
|
// the contextual_likes row should reference `other` and the playing
|
||||||
// track's session vector.
|
// 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)
|
t.Fatalf("like: %d", r.Code)
|
||||||
}
|
}
|
||||||
var count int
|
var count int
|
||||||
@@ -265,7 +265,7 @@ func TestLikeTrack_NoOpenPlayEvent_NoContextualLike(t *testing.T) {
|
|||||||
album := seedAlbum(t, pool, artist.ID, "X", 1990)
|
album := seedAlbum(t, pool, artist.ID, "X", 1990)
|
||||||
track := seedTrack(t, pool, album.ID, artist.ID, "T", 1, 100_000)
|
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)
|
t.Fatalf("like: %d", r.Code)
|
||||||
}
|
}
|
||||||
var count int
|
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)+`"}`))
|
_ = callEvents(h, user, []byte(`{"type":"play_started","track_id":"`+uuidToString(playing.ID)+`"}`))
|
||||||
_ = callLike(h, user, http.MethodPost, "/api/likes/tracks/"+uuidToString(other.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)
|
t.Fatalf("unlike: %d", r.Code)
|
||||||
}
|
}
|
||||||
// general_likes deleted.
|
// general_likes deleted.
|
||||||
|
|||||||
Reference in New Issue
Block a user