(t *testing.T)
| 160 | } |
| 161 | |
| 162 | func TestGetCopyrightYearRange(t *testing.T) { |
| 163 | yearRange := GetCopyrightYearRange() |
| 164 | currentYear := time.Now().Year() |
| 165 | |
| 166 | // Should contain the current year |
| 167 | if !strings.Contains(yearRange, fmt.Sprintf("%d", currentYear)) { |
| 168 | t.Errorf("GetCopyrightYearRange() should contain current year %d, got: %s", currentYear, yearRange) |
| 169 | } |
| 170 | |
| 171 | // Should be in expected format (either "2025" or "2025-2026") |
| 172 | if !strings.Contains(yearRange, "2025") { |
| 173 | t.Errorf("GetCopyrightYearRange() should contain start year 2025, got: %s", yearRange) |
| 174 | } |
| 175 | |
| 176 | // Should not be empty |
| 177 | if yearRange == "" { |
| 178 | t.Error("GetCopyrightYearRange() should not return empty string") |
| 179 | } |
| 180 | } |
nothing calls this directly
no test coverage detected