refactor: make Following sync outcome explicit
All checks were successful
CI / lint (pull_request) Successful in 4m13s
CI / build-release (pull_request) Successful in 9s
CI / browser-journey (pull_request) Successful in 7m9s
CI / release-candidate (pull_request) Has been skipped

This commit is contained in:
timmy 2026-08-23 06:23:57 +00:00
parent 6c12731215
commit d3ba5975a0
3 changed files with 8 additions and 1 deletions

View File

@ -3785,6 +3785,7 @@ async def mutate_global_search_preview_subscription(
)
return JSONResponse({
**result,
"following_synced": True,
"following_revision": following["revision"],
"following_count": len(following["items"]),
})

View File

@ -42,7 +42,12 @@ async def test_confirmed_watch_updates_account_following_collection(monkeypatch,
following = await client.get("/api/v1/following")
assert watched.status_code == 200
assert watched.json() == {"watching": True, "following_revision": 1, "following_count": 1}
assert watched.json() == {
"watching": True,
"following_synced": True,
"following_revision": 1,
"following_count": 1,
}
assert following.status_code == 200
assert following.headers["cache-control"] == "no-store"
assert following.json() == {"revision": 1, "items": [{

View File

@ -285,6 +285,7 @@ async def test_search_preview_subscription_mutation_revalidates_target_and_confi
expected_count = 1 if watching else 0
assert response.json() == {
"watching": watching,
"following_synced": True,
"following_revision": expected_count,
"following_count": expected_count,
}