Fix API controller tests: 404 handling, JSON encoding, media filtering
- Add FallbackController for proper 404 JSON responses on missing resources - Add non-bang get_source/1 and get_media_item/1 for safe lookups - Fix Task JSON encoder: remove Repo.preload call (not available in encoder scope), handle NotLoaded associations by returning nil - Fix media item index: use list_media_items_for_source/1 instead of list_pending_media_items_for/1 which had overly restrictive filtering - Add missing extras_directory to test config - All 1007 tests pass
This commit is contained in:
@@ -6,6 +6,7 @@ config :pinchflat,
|
||||
apprise_executable: Path.join([File.cwd!(), "/test/support/scripts/yt-dlp-mocks/repeater.sh"]),
|
||||
media_directory: Path.join([System.tmp_dir!(), "test", "media"]),
|
||||
metadata_directory: Path.join([System.tmp_dir!(), "test", "metadata"]),
|
||||
extras_directory: Path.join([System.tmp_dir!(), "test", "extras"]),
|
||||
tmpfile_directory: Path.join([System.tmp_dir!(), "test", "tmpfiles"]),
|
||||
file_watcher_poll_interval: 50
|
||||
|
||||
|
||||
Reference in New Issue
Block a user