[Tests] Add unit tests for issues #102, #103, #104, #105#109
Merged
[Tests] Add unit tests for issues #102, #103, #104, #105#109
Conversation
fboucher
commented
Apr 1, 2026
Owner
Author
fboucher
left a comment
There was a problem hiding this comment.
✅ Code Review — APPROVED
Reviewed by: Livingston (Code Review Specialist)
All 26 acceptance criteria from issues #102, #103, #104, #105 are fully covered.
Coverage Summary:
- Issue #102 (SummaryEndpoints): ✅ 8/8 ACs covered
- Issue #103 (AISettingsProvider): ✅ 8/8 ACs covered
- Issue #104 (SettingEndpoints): ✅ 4/4 ACs covered
- Issue #105 (PostEndpoints): ✅ 6/6 ACs covered
Test Quality:
✅ All 227 tests pass (196 Api.Tests + 31 AIServices.Tests)
✅ Proper mocking with IDataStorageService and IConfiguration
✅ Edge cases thoroughly covered (null, empty, whitespace, non-existent)
✅ Follows xUnit + FluentAssertions conventions
✅ Pre-existing test failures fixed
Highlights:
- AISettingsProvider fallback chain: All 5 fallback paths tested (DB → AiApiKey config → REKA_API_KEY config → env var → throw)
- SummaryEndpoints: Happy paths + validation + not-found scenarios
- SettingEndpoints: Default prompts verified with {topic}/{content} placeholders + API key masking security test
- PostEndpoints: Comprehensive edge cases including empty list filtering and duplicate post behavior
Verdict:
APPROVE — Ready to merge. No gaps found.
*Excellent work by Linusecho BEGIN___COMMAND_OUTPUT_MARKER ; PS1= ; PS2= ; unset HISTFILE ; EC=0 ; echo ___BEGIN___COMMAND_DONE_MARKER___0 ; } 🎯
Full review document: .squad/decisions/inbox/livingston-pr109-review.md
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
- GET /api/posts/{id} non-existent ID → 404 (GetPost_WhenPostDoesNotExist_ReturnsNotFound)
- DELETE /api/posts/{id} non-existent ID → 404 (DeletePost_WhenPostDoesNotExist_ReturnsNotFound)
- GET /api/posts/ all-read scenario → read posts excluded from unread list
- GET /api/posts/read no-read scenario → returns empty list
- POST /api/posts/ duplicate RowKey → overwrites existing (upsert behavior)
- Fixed 5 pre-existing test failures: shared storage assertions and empty-ID routing edge cases
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
f7636a1 to
dbf0b63
Compare
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #102, #103, #104, #105
All 227 tests pass (196 Api.Tests + 31 AIServices.Tests).
Changes
#102 — SummaryEndpoints tests (10 new tests)
GetSummaries,SaveSummary,GetReadingNotes,SaveReadingNotesMarkdownGetSummariesandGetReadingNotesSaveSummary(missing PartitionKey, RowKey, Title)SaveReadingNotesMarkdownwith empty body#103 — AISettingsProvider fallback chain (13 new tests)
AppSettings:AiApiKeyconfigAppSettings:REKA_API_KEYconfig key fallbackREKA_API_KEYfallbackInvalidOperationException#104 — SettingEndpoints edge cases (3 new tests)
GetSettingsreturns default prompts with required placeholders ({topic},{content})GetSettingsmasksAiApiKeyas"********"(security check)SaveSettingswith empty PartitionKey returns 400#105 — PostEndpoints edge cases (5 acceptance criteria verified + 5 pre-existing failures fixed)