Skip to content

Commit

Permalink
Update test to reflect new responsibility of query
Browse files Browse the repository at this point in the history
Refs #2100
  • Loading branch information
thewilkybarkid committed Nov 22, 2024
1 parent b2431c2 commit b58e9bf
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions test/Comments/Queries.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -332,20 +332,22 @@ describe('GetACommentInNeedOfADoi', () => {
codeOfConductWasAgreed,
]

test('finds a comment in need of a DOI', () => {
test.failing('finds a comment in need of a DOI', () => {
const events = [...eventsNeededToRequestPublication, commentPublicationWasRequested]

const stubbedData: Comments.InputForCommentZenodoRecord = {
authorId: Orcid('0000-0002-1825-0097'),
competingInterests: Option.none(),
comment: html``,
persona: 'public',
prereviewId: 0,
const expectedInputForCommentZenodoRecord: Comments.InputForCommentZenodoRecord = {
authorId: commentWasStarted.authorId,
prereviewId: commentWasStarted.prereviewId,
comment: commentWasEntered.comment,
persona: personaWasChosen.persona,
competingInterests: competingInterestsWereDeclared.competingInterests,
}

const actual = _.GetACommentInNeedOfADoi(Array.map(events, event => ({ event, resourceId })))

expect(actual).toStrictEqual(Option.some({ commentId: resourceId, inputForCommentZenodoRecord: stubbedData }))
expect(actual).toStrictEqual(
Option.some({ commentId: resourceId, inputForCommentZenodoRecord: expectedInputForCommentZenodoRecord }),
)
})

test.todo('finds the oldest comment in need of a DOI when multiple comments need a DOI')
Expand Down

0 comments on commit b58e9bf

Please sign in to comment.