|
|
@@ -120,10 +120,10 @@ describe('pageListingApiModule', () => {
|
|
|
});
|
|
|
});
|
|
|
|
|
|
- describe('info endpoint', () => {
|
|
|
+ describe('item endpoint', () => {
|
|
|
it('should anonymize path parameter when present', () => {
|
|
|
const originalUrl =
|
|
|
- '/_api/v3/page-listing/info?path=/wiki/documentation';
|
|
|
+ '/_api/v3/page-listing/item?path=/wiki/documentation';
|
|
|
|
|
|
// Ensure canHandle returns true for this URL
|
|
|
expect(pageListingApiModule.canHandle(originalUrl)).toBe(true);
|
|
|
@@ -131,12 +131,12 @@ describe('pageListingApiModule', () => {
|
|
|
const result = pageListingApiModule.handle(mockRequest, originalUrl);
|
|
|
|
|
|
expect(result).toEqual({
|
|
|
- 'http.target': '/_api/v3/page-listing/info?path=%5BANONYMIZED%5D',
|
|
|
+ 'http.target': '/_api/v3/page-listing/item?path=%5BANONYMIZED%5D',
|
|
|
});
|
|
|
});
|
|
|
|
|
|
it('should return null when no path parameter is present', () => {
|
|
|
- const originalUrl = '/_api/v3/page-listing/info';
|
|
|
+ const originalUrl = '/_api/v3/page-listing/item';
|
|
|
|
|
|
// Ensure canHandle returns true for this URL
|
|
|
expect(pageListingApiModule.canHandle(originalUrl)).toBe(true);
|