refactor: consolidate lang into constants, rename services to email
- Merge lang package into constants (add IsValidLang, ValidateLang, AllLangs) - Rename internal/services to internal/email for consistency with pdf package - Rename types to avoid redundancy: EmailService→Service, EmailConfig→Config - Update all imports and references across codebase - Delete internal/lang directory (functions moved to constants)
This commit is contained in:
@@ -8,14 +8,10 @@ import (
|
||||
)
|
||||
|
||||
// TestPlainText tests the PlainText handler
|
||||
// NOTE: This test requires running from project root due to template path resolution
|
||||
// Run with: go test ./internal/handlers/ -run TestPlainText -v
|
||||
// Or skip in CI: go test ./internal/handlers/ -run TestPlainText -short
|
||||
func TestPlainText(t *testing.T) {
|
||||
// Skip if running in short mode (CI) - requires project root
|
||||
if testing.Short() {
|
||||
t.Skip("Skipping PlainText test - requires running from project root")
|
||||
}
|
||||
// Change to project root for template path resolution
|
||||
cleanup := chDirToProjectRoot(t)
|
||||
defer cleanup()
|
||||
|
||||
handler := newTestCVHandler(t, "localhost:8080", nil)
|
||||
|
||||
@@ -122,12 +118,10 @@ func TestPlainText(t *testing.T) {
|
||||
}
|
||||
|
||||
// TestPlainTextDownloadFilename tests that download filename is correctly formatted
|
||||
// NOTE: This test requires running from project root due to template path resolution
|
||||
func TestPlainTextDownloadFilename(t *testing.T) {
|
||||
// Skip if running in short mode (CI) - requires project root
|
||||
if testing.Short() {
|
||||
t.Skip("Skipping PlainTextDownloadFilename test - requires running from project root")
|
||||
}
|
||||
// Change to project root for template path resolution
|
||||
cleanup := chDirToProjectRoot(t)
|
||||
defer cleanup()
|
||||
|
||||
handler := newTestCVHandler(t, "localhost:8080", nil)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user