summaryrefslogtreecommitdiff
path: root/tests/test-wttrin--fetch-url.el
Commit message (Collapse)AuthorAgeFilesLines
* refactor: tests: standardize naming, consolidate files, and expand testutilCraig Jennings2026-02-171-0/+11
| | | | | | | | | | | | | | | | | - Expand testutil-wttrin.el with shared fixtures and macros (testutil-wttrin-with-clean-weather-buffer, testutil-wttrin-mock-http-response, sample ANSI/weather constants) - Consolidate cache tests: port unique tests from cleanup-cache-constants and cleanup-cache-refactored into cleanup-cache-if-needed, delete obsolete files - Extract startup-delay tests into dedicated file - Add setup/teardown and (require 'testutil-wttrin) to all test files - Rename all 160 tests to follow test-<module>-<category>-<scenario>-<expected-result> convention - Rename integration test file and add detailed docstrings - Update Makefile glob to discover new integration test naming pattern Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* refactor: fetch: extract response parsing into separate testable functionsCraig Jennings2025-11-131-25/+0
| | | | | | Extracted wttrin--extract-response-body and wttrin--handle-fetch-callback from wttrin--fetch-url to improve testability and separation of concerns. Added comprehensive unit tests for both new functions.
* refactor: fetch: extract duplicate URL fetching logic into wttrin--fetch-urlCraig Jennings2025-11-081-0/+205
- Created wttrin--fetch-url helper to eliminate code duplication - Refactored wttrin-fetch-raw-string to use helper (27 lines -> 3 lines) - Refactored wttrin--mode-line-fetch-weather to use helper (~30 lines -> ~10 lines) - Added comprehensive ERT test suite with 9 tests covering normal, boundary, and error cases - All tests passing This refactoring provides a single point of truth for async URL fetching, making the code more maintainable and reducing duplication by ~40 lines.