@@ -10,14 +10,18 @@ def dotloop_mock(request, request_type = :get, status_code = 200, query_params =
1010 def dotloop_mock_batch ( request )
1111 endpoint = standard_endpoints ( request )
1212 batch1_file = File . new ( filename_to_path_json ( [ endpoint , '_page1' ] ) )
13- batch2_file = File . new ( filename_to_path_json ( [ endpoint , '_page2' ] ) )
13+ batch2_file = File . new ( filename_to_path_json ( [ endpoint , '_page1' ] ) )
14+ batch3_file = File . new ( filename_to_path_json ( [ endpoint , '_page2' ] ) )
1415 url = endpoint_to_url ( endpoint )
1516 WebMock
16- . stub_request ( :get , [ url , '?batch_number=1&batch_size=50 ' ] . join )
17+ . stub_request ( :get , [ url , '?batch_number=1&batch_size=100 ' ] . join )
1718 . to_return ( body : batch1_file , status : 200 , headers : { 'Content-Type' => 'application/json' } )
1819 WebMock
19- . stub_request ( :get , [ url , '?batch_number=2 &batch_size=50' ] . join )
20+ . stub_request ( :get , [ url , '?batch_number=1 &batch_size=50' ] . join )
2021 . to_return ( body : batch2_file , status : 200 , headers : { 'Content-Type' => 'application/json' } )
22+ WebMock
23+ . stub_request ( :get , [ url , '?batch_number=2&batch_size=50' ] . join )
24+ . to_return ( body : batch3_file , status : 200 , headers : { 'Content-Type' => 'application/json' } )
2125 end
2226
2327 def dotloop_mock_raise_error ( request , error , batch = false )
0 commit comments