Skip to content

test(api): baseURL path-prefix coverage + ContentCache indent fix#3

Merged
BunsDev merged 1 commit into
mainfrom
fix/api-path-prefix-tests-and-cache-indent
May 30, 2026
Merged

test(api): baseURL path-prefix coverage + ContentCache indent fix#3
BunsDev merged 1 commit into
mainfrom
fix/api-path-prefix-tests-and-cache-indent

Conversation

@apple-techie
Copy link
Copy Markdown

What

  • New regression test testListPostsPreservesBaseURLPathPrefix — asserts that a baseURL carrying a path prefix (e.g. https://host/feedback) is preserved when building request URLs (/feedback/api/public/v1/posts). The request(path:) join already does this correctly on main; this locks in the behavior. The no-prefix case stays covered by the existing testListPostsParsesEnvelope.
  • ContentCache indentation fixContentCache.init and its body had landed at column 0; re-indented to match the surrounding type.

Why

The other recent fixes (OTP error surfacing, needsSignIn reset on submit/vote/comment) already have regression tests on main. The path-prefix branch of request(path:) was the one behavior with no test, and the cache init was a stray formatting bug.

Verification

  • swift test85 tests, 0 failures
  • swiftlint --strict on changed files → 0 violations

🤖 Generated with Claude Code

…ndent

The request(path:) URL builder already preserves a baseURL path prefix
(e.g. https://host/feedback), but it had no regression test. Add one
asserting the prefix is joined ahead of the API path.

Also fix the mis-indented ContentCache.init that landed at column 0.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@BunsDev BunsDev requested a review from Copilot May 30, 2026 05:25
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@BunsDev BunsDev merged commit f346c06 into main May 30, 2026
2 checks passed
@BunsDev BunsDev deleted the fix/api-path-prefix-tests-and-cache-indent branch May 30, 2026 06:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants