Skip to content

[Tests] SummaryEndpoints — add tests for all 4 methods #102

@fboucheros

Description

@fboucheros

What to build

SummaryEndpointsTests.cs exists but is completely empty. Add unit tests for all 4 endpoint methods in SummaryEndpoints.cs:

  • GetSummariesGET /api/summary/
  • SaveSummaryPOST /api/summary/summary
  • GetReadingNotesGET /api/summary/{number}
  • SaveReadingNotesMarkdownPOST /api/summary/{number}/markdown

Follow the existing pattern in NoteEndpointsTests.cs (xUnit + FluentAssertions + mocked IDataStorageService / ISummaryService).

Acceptance criteria

  • Happy-path test for each of the 4 endpoint methods
  • Not-found / empty response test for at least GetSummaries and GetReadingNotes
  • Validation-error test for SaveSummary (e.g. missing required fields)
  • All new tests pass in CI

Blocked by

None — can start immediately.

Priority

🔴 Critical — this is the most important test gap in the API layer

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status

    No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions