Fix user gallery job pagination logic and add test for empty submission pages

- Updated pagination condition in `user_gallery_job.rb` to break when the number of pages is less than or equal to the current page.
- Added a new test case in `user_gallery_job_spec.rb` to handle scenarios with empty submission pages, ensuring no new records are created.
- Introduced a fixture file `api_search_empty_submissions.json` to simulate API responses with no submissions.
This commit is contained in:
Dylan Knutson
2025-01-20 16:25:26 +00:00
parent b1cdca1513
commit d8ffd9bde1
3 changed files with 40 additions and 1 deletions

View File

@@ -0,0 +1,12 @@
{
"sid": "9B5BPQqTZ,Mj-nYbL2tuIPoO,b",
"results_count_all": "0",
"results_count_thispage": 0,
"pages_count": 0,
"page": 0,
"user_location": "",
"rid": "520e18fe15",
"rid_ttl": "15 minutes",
"search_params": [],
"submissions": []
}