-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Priority
Low - Technical debt
Description
Multiple test files have duplicate setup code. This makes tests harder to maintain and violates the DRY principle. We should extract common patterns into shared modules.
Current State
- Test setup code is duplicated across multiple test files
- Common patterns like creating verified users, groups, and huddlz are repeated
- Makes it harder to update test logic consistently
Acceptance Criteria
- Create shared test support modules in test/support/
- Extract common generators (verified users, groups with members, etc.)
- Extract common assertion helpers
- Update existing tests to use shared helpers
- Document test patterns and helpers
- Ensure all tests still pass after refactoring
Technical Notes
- Look for patterns in test/huddlz/communities/*_test.exs files
- Consider creating modules like TestHelpers.Users, TestHelpers.Groups
- Use ExUnit.CaseTemplate for common setup
- Maintain backward compatibility during refactoring
Benefits
- Easier to maintain tests
- Faster to write new tests
- Consistent test data generation
- Single source of truth for test helpers
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request