Skip to content

Cookie unit tests #95

Open
Open

Description

@aram356

Description

Add unit tests for request-cookie parsing and generated Set-Cookie fields. Main has tests for preserving manually constructed repeated cookies in adapter conversion, but no portable parsing/serialization helper or associated unit suite (exported core modules, raw header extractor, generic response construction).

Steps to reproduce

  1. Inspect cookie-related tests and the core API surface.
  2. Distinguish adapter tests using literal Set-Cookie strings from parser/builder behavior checks.
  3. Look for assertions covering parsed request values and generated cookie attributes.

Expected behavior

Focused portable unit tests verify cookie parsing and Set-Cookie serialization independently of provider runtimes.

Impact

Cookie helper behavior would otherwise lack regression protection beyond raw HTTP header transport.

Proposed fix

Add tests alongside the implementations from #93 and #94. Cover valid/malformed request input, documented duplicate handling, each supported attribute, and multiple generated Set-Cookie values.

Done when

  • Request-cookie parsing covers ordinary and malformed input plus the chosen duplicate policy.
  • Generated Set-Cookie fields cover each supported attribute and invalid values.
  • Multiple cookies are asserted as separate fields; the tests need no provider credentials.

Related

Parent story #93; builder #94; epic #88. Existing transport coverage comes from merged PR #306 and PR #379.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions