Skip to content

Commit

Permalink
don't care about array order
Browse files Browse the repository at this point in the history
  • Loading branch information
finlay-jisc committed Nov 26, 2024
1 parent 5edd97b commit 1603f93
Showing 1 changed file with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -500,13 +500,14 @@ describe('Create live publication', () => {
});

expect(createPublicationRequest.status).toEqual(201);
expect(createPublicationRequest.body.linkedTo).toHaveLength(2);
expect(createPublicationRequest.body.linkedTo[0].publicationToId).toEqual('publication-problem-live');
expect(createPublicationRequest.body.linkedTo[0].versionToId).toEqual('publication-problem-live-v2');
expect(createPublicationRequest.body.linkedTo[0].draft).toEqual(false);
expect(createPublicationRequest.body.linkedTo[1].publicationToId).toEqual('publication-problem-live-2');
expect(createPublicationRequest.body.linkedTo[1].versionToId).toEqual('publication-problem-live-2-v1');
expect(createPublicationRequest.body.linkedTo[1].draft).toEqual(false);
expect(createPublicationRequest.body.linkedTo).toMatchObject([
{ publicationToId: 'publication-problem-live', versionToId: 'publication-problem-live-v2', draft: false },
{
publicationToId: 'publication-problem-live-2',
versionToId: 'publication-problem-live-2-v1',
draft: false
}
]);
});

test('Invalid links cannot be created via direct publishing', async () => {
Expand Down

0 comments on commit 1603f93

Please sign in to comment.