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:
12
test/fixtures/files/domain/inkbunny/job/api_search_empty_submissions.json
vendored
Normal file
12
test/fixtures/files/domain/inkbunny/job/api_search_empty_submissions.json
vendored
Normal 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": []
|
||||
}
|
||||
Reference in New Issue
Block a user