Skip to content

Commit 0f4a03c

Browse files
committed
fix(signposting): fix linkset-json format
1 parent ce0774f commit 0f4a03c

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

src/app/features/files/pages/file-detail/file-detail.component.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ describe('FileDetailComponent', () => {
104104
expect(linkTags.length).toBe(2);
105105
expect(linkTags[0].getAttribute('href')).toBe('http://localhost:4200/metadata/file-1/?format=linkset');
106106
expect(linkTags[0].getAttribute('type')).toBe('application/linkset');
107-
expect(linkTags[1].getAttribute('href')).toBe('http://localhost:4200/metadata/file-1/?format=linkset%2Bjson');
107+
expect(linkTags[1].getAttribute('href')).toBe('http://localhost:4200/metadata/file-1/?format=linkset-json');
108108
expect(linkTags[1].getAttribute('type')).toBe('application/linkset+json');
109109
});
110110
});

src/app/features/preprints/pages/preprint-details/preprint-details.component.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ describe('PreprintDetailsComponent SSR Tests', () => {
483483
expect(linkTags.length).toBe(2);
484484
expect(linkTags[0].getAttribute('href')).toBe('http://localhost:4200/metadata/preprint-1/?format=linkset');
485485
expect(linkTags[0].getAttribute('type')).toBe('application/linkset');
486-
expect(linkTags[1].getAttribute('href')).toBe('http://localhost:4200/metadata/preprint-1/?format=linkset%2Bjson');
486+
expect(linkTags[1].getAttribute('href')).toBe('http://localhost:4200/metadata/preprint-1/?format=linkset-json');
487487
expect(linkTags[1].getAttribute('type')).toBe('application/linkset+json');
488488
});
489489

src/app/features/project/overview/project-overview.component.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ describe('ProjectOverviewComponent SSR Tests', () => {
293293
expect(linkTags.length).toBe(2);
294294
expect(linkTags[0].getAttribute('href')).toBe('http://localhost:4200/metadata/project-123/?format=linkset');
295295
expect(linkTags[0].getAttribute('type')).toBe('application/linkset');
296-
expect(linkTags[1].getAttribute('href')).toBe('http://localhost:4200/metadata/project-123/?format=linkset%2Bjson');
296+
expect(linkTags[1].getAttribute('href')).toBe('http://localhost:4200/metadata/project-123/?format=linkset-json');
297297
expect(linkTags[1].getAttribute('type')).toBe('application/linkset+json');
298298
});
299299

src/app/features/registry/pages/registry-overview/registry-overview.component.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,7 @@ describe('RegistryOverviewComponent', () => {
645645
expect(linkTags.length).toBe(2);
646646
expect(linkTags[0].getAttribute('href')).toBe('http://localhost:4200/metadata/registry-1/?format=linkset');
647647
expect(linkTags[0].getAttribute('type')).toBe('application/linkset');
648-
expect(linkTags[1].getAttribute('href')).toBe('http://localhost:4200/metadata/registry-1/?format=linkset%2Bjson');
648+
expect(linkTags[1].getAttribute('href')).toBe('http://localhost:4200/metadata/registry-1/?format=linkset-json');
649649
expect(linkTags[1].getAttribute('type')).toBe('application/linkset+json');
650650
});
651651

src/app/shared/services/signposting.service.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ describe('Service: Signposting', () => {
4444
service.addSignposting('abcde');
4545
const linkHeader = (mockResponseInit.headers as Headers).get('Link');
4646
expect(linkHeader).toBe(
47-
'<https://staging3.osf.io/metadata/abcde/?format=linkset>; rel="linkset"; type="application/linkset", <https://staging3.osf.io/metadata/abcde/?format=linkset%2Bjson>; rel="linkset"; type="application/linkset+json"'
47+
'<https://staging3.osf.io/metadata/abcde/?format=linkset>; rel="linkset"; type="application/linkset", <https://staging3.osf.io/metadata/abcde/?format=linkset-json>; rel="linkset"; type="application/linkset+json"'
4848
);
4949
});
5050

@@ -59,7 +59,7 @@ describe('Service: Signposting', () => {
5959
},
6060
{
6161
rel: 'linkset',
62-
href: 'https://staging3.osf.io/metadata/abcde/?format=linkset%2Bjson',
62+
href: 'https://staging3.osf.io/metadata/abcde/?format=linkset-json',
6363
type: 'application/linkset+json',
6464
},
6565
]);

src/app/shared/services/signposting.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export class SignpostingService {
5555
},
5656
{
5757
rel: 'linkset',
58-
href: this.buildUrl(baseUrl, 'linkset+json'),
58+
href: this.buildUrl(baseUrl, 'linkset-json'),
5959
type: LINKSET_JSON_TYPE,
6060
},
6161
];

0 commit comments

Comments
 (0)