Skip to content

Conversation

@nbudin
Copy link
Contributor

@nbudin nbudin commented Nov 14, 2025

Summary

  • Fixed EmailForwardingRouter.all_staff_position_mappings to generate email forwarding mappings for staff position email aliases in addition to the primary email address
  • Added comprehensive tests to verify email alias mapping functionality

Changes

Service Fix (app/services/email_forwarding_router.rb)

Changed from using map to flat_map to generate multiple mappings per staff position:

  • One mapping for the primary email address (e.g., staff@example.com)
  • Additional mappings for each email alias (e.g., help@example.com, support@example.com)

All aliases route to the same destination addresses (staff member emails + CC addresses).

Tests (test/services/email_forwarding_router_test.rb)

Added new test file with comprehensive coverage:

  • ✅ Verifies mappings are created for primary email and all aliases
  • ✅ Confirms all aliases route to the same destination addresses
  • ✅ Tests backwards compatibility for staff positions without aliases
  • ✅ Validates multiple staff positions with different aliases

Test Results

All 4 tests passing with 23 assertions.

🤖 Generated with Claude Code

nbudin and others added 2 commits November 14, 2025 12:11
Tests verify that EmailForwardingRouter.all_staff_position_mappings
correctly generates email forwarding mappings for both the primary
staff position email and all configured email aliases.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@nbudin nbudin added bug patch Bumps the patch version number on release labels Nov 14, 2025
@github-actions
Copy link
Contributor

Code Coverage Report: Only Changed Files listed

Package Coverage
Overall Coverage 🟢 51.08%

Minimum allowed coverage is 0%, this run produced 51.08%

@nbudin nbudin merged commit 9eb59cc into main Nov 14, 2025
17 checks passed
@nbudin nbudin deleted the fix-staff-position-aliases branch November 14, 2025 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug patch Bumps the patch version number on release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants