Repository navigation
test: cover referral service tracking - #1429
BenjaminMichaelis merged 2 commits into
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟢 Approval recommended
The focused test-only changes match the service behavior, with no blocking issues identified.
No open issues 🎉
What changed in this PR
Adds integration coverage for referral tracking using the existing SQLite-backed test infrastructure.
Changes:
- Covers null users, valid referrals, self-referrals, and unknown referral IDs.
- Verifies referral counts and protects unrelated users from changes.
- Uses unique user IDs to isolate test data.
| File | Description |
|---|---|
| EssentialCSharp.Web.Tests/ReferralServiceTests.cs | Adds four referral service tests and user setup/query helpers. |
Review effort: Balanced
|
One or more custom setup steps configured for this repository failed during this Copilot code review run: Setup steps run before each review. If the review above is missing context, or no review was posted at all, the failing step above may be the cause. See the workflow run for failure details, fix your setup steps configuration, and re-request a review. Note You can configure setup steps for Copilot code review separately from Copilot cloud agent with a |
🤖 This is an automated pull request from Repo Assist, an automated AI assistant for this repository.
Summary
Adds integration coverage for
ReferralServiceto protect referral tracking behavior:ReferralCountRationale
Referral tracking changes user state and relies on Identity claims plus EF Core bulk updates, but previously had no automated coverage. These tests use the existing SQLite-backed integration test factory and unique user IDs so they remain isolated when TUnit runs tests in parallel.
Test Status
dotnet build EssentialCSharp.Web.Tests/EssentialCSharp.Web.Tests.csproj --no-restore --configuration Release— passed with 0 warnings and 0 errors.dotnet test EssentialCSharp.Web.Tests/EssentialCSharp.Web.Tests.csproj— 153 tests passed; two unrelated pre-existing integration tests failed (CaptchaService_Verify_SuccessandKnownBreachedPassword_IsDetected) because their external service responses were unavailable in this environment.Warning
Firewall blocked 2 domains
The following domains were blocked by the firewall during workflow execution:
api.hcaptcha.comapi.pwnedpasswords.comTo allow these domains, add them to the
network.allowedlist in your workflow frontmatter:See Network Configuration for more information.
Add this agentic workflow to your repo
To install this agentic workflow, run