adjust message identifier in test

This commit is contained in:
kenobi 2023-11-19 18:56:08 +01:00
parent 1348abbd48
commit 68546b0b50

View File

@ -3,6 +3,7 @@ import VoteController from "../../server/helper/vote.controller"
import { JellyfinHandler } from "../../server/jellyfin/handler" import { JellyfinHandler } from "../../server/jellyfin/handler"
import { ExtendedClient } from "../../server/structures/client" import { ExtendedClient } from "../../server/structures/client"
import { Emoji, NONE_OF_THAT } from "../../server/constants" import { Emoji, NONE_OF_THAT } from "../../server/constants"
import { isVoteMessage } from "../../server/helper/messageIdentifiers"
describe('vote controller - none_of_that functions', () => { describe('vote controller - none_of_that functions', () => {
const testEventId = '1234321' const testEventId = '1234321'
@ -89,8 +90,10 @@ describe('vote controller - none_of_that functions', () => {
}) })
} }
} }
if (isVoteMessage(mockMessage)) {
const result = await votes.getVotesByEmote(mockMessage, 'guildId', 'requestId') const result = await votes.getVotesByEmote(mockMessage, 'guildId', 'requestId')
expect(result.length).toEqual(5) expect(result.length).toEqual(5)
expect(result).toEqual(votesList.filter(x => x.movie != NONE_OF_THAT)) expect(result).toEqual(votesList.filter(x => x.movie != NONE_OF_THAT))
}
}) })
}) })