feat/40-reroll-on-disinterest #54
|
@ -13,8 +13,9 @@ test('parse votes from vote message', () => {
|
|||
]
|
||||
const testEventId = '1234321'
|
||||
const testEventDate = new Date('2023-01-01')
|
||||
const testGuildId = "888999888"
|
||||
const voteController: VoteController = new VoteController(<ExtendedClient>{}, <JellyfinHandler>{})
|
||||
const testMessage = voteController.createVoteMessageText(testEventId, testEventDate, testMovies, "guildid", "requestId")
|
||||
const testMessage = voteController.createVoteMessageText(testEventId, testEventDate, testMovies, testGuildId, "requestId")
|
||||
|
||||
|
||||
const expectedResult: VoteMessageInfo = {
|
||||
|
@ -53,3 +54,21 @@ test('parse votes from vote message', () => {
|
|||
expect(result.votes.length).toEqual(expectedResult.votes.length)
|
||||
expect(result).toEqual(expectedResult)
|
||||
})
|
||||
|
||||
test('parse votes from vote message', () => {
|
||||
const testMovies = [
|
||||
'Movie1',
|
||||
'Movie2',
|
||||
'Movie3',
|
||||
'Movie4',
|
||||
'Movie5',
|
||||
]
|
||||
const testEventId = '1234321'
|
||||
const testEventDate = new Date('2023-01-01')
|
||||
const testGuildId = "888999888"
|
||||
const voteController: VoteController = new VoteController(<ExtendedClient>{}, <JellyfinHandler>{})
|
||||
const testMessage = voteController.createVoteMessageText(testEventId, testEventDate, testMovies, testGuildId, "requestId")
|
||||
|
||||
const result = voteController.parseGuildIdAndEventIdFromWholeMessage(testMessage)
|
||||
expect(result).toEqual({ guildId: testGuildId, eventId: testEventId })
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue