fix: adopt changed export api url
This commit is contained in:
1 parent
db529d2dc9
commit
d8ff148f86
4 files changed
+6
-3
No files matched your search
@@ -66,7 +66,7 @@ class MyEpCheckCommand extends Command
|
||||
|
||||
// A whole page rather than one row: the first row often has no boarding points, and an
|
||||
// unread pickups array is exactly the failure this probe exists to catch.
|
||||
$payload = $this->apiClient->get('api/travels/export', ['page' => 1, 'perPage' => 500]);
|
||||
$payload = $this->apiClient->get('api/exports/travels', ['page' => 1, 'perPage' => 500]);
|
||||
$meta = $payload['meta'] ?? [];
|
||||
|
||||
$io->definitionList(...array_map(
|
||||
|
||||
@@ -11,7 +11,7 @@ use Psr\Log\LoggerInterface;
|
||||
*/
|
||||
class TravelExportClient
|
||||
{
|
||||
private const PATH = 'api/travels/export';
|
||||
private const PATH = 'api/exports/travels';
|
||||
private const PER_PAGE = 500;
|
||||
|
||||
/**
|
||||
|
||||
@@ -44,7 +44,7 @@ class ApiClientTest extends TestCase
|
||||
return new MockResponse('[]');
|
||||
});
|
||||
|
||||
$this->getClientInstance($httpClient)->get('api/travels/export', ['page' => 2, 'perPage' => 500]);
|
||||
$this->getClientInstance($httpClient)->get('api/exports/travels', ['page' => 2, 'perPage' => 500]);
|
||||
|
||||
$this->assertStringContainsString('page=2', $requestedUrl);
|
||||
$this->assertStringContainsString('perPage=500', $requestedUrl);
|
||||
|
||||
@@ -48,6 +48,9 @@ class TravelExportClientTest extends TestCase
|
||||
|
||||
$this->getClientInstance($httpClient)->fetchAll();
|
||||
|
||||
// the path is asserted because it has already moved once - it was api/travels/export
|
||||
// until MyE&P found that ambiguous against api/travels/{dateCode}
|
||||
$this->assertStringStartsWith('https://myep.example/api/exports/travels?', $urls[0]);
|
||||
$this->assertStringContainsString('page=1', $urls[0]);
|
||||
$this->assertStringContainsString('page=2', $urls[1]);
|
||||
$this->assertStringContainsString('perPage=500', $urls[0]);
|
||||
|
||||
Reference in new issue
Block a user