From 4bd1a7ca692ebd0ea1af8f03c6af2fe54f4ffa3a Mon Sep 17 00:00:00 2001 From: Skillz4Killz <23035000+Skillz4Killz@users.noreply.github.com> Date: Tue, 23 Nov 2021 11:57:42 +0000 Subject: [PATCH] feat: getChannel test Closes #1235 --- tests/channels/getChannel.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 tests/channels/getChannel.ts diff --git a/tests/channels/getChannel.ts b/tests/channels/getChannel.ts new file mode 100644 index 000000000..4d5ef3978 --- /dev/null +++ b/tests/channels/getChannel.ts @@ -0,0 +1,13 @@ +import { assertEquals } from "../deps.ts"; +import { bot, guild } from "../mod.ts"; + +Deno.test("[channel] Get a channel", async () => { + const channel = await bot.helpers.createChannel(guild.id, { + name: "fetching", + }); + + const fetched = await bot.helpers.getChannel(channel.id); + + assertEquals(channel.id, fetched.id); + assertEquals(channel.name, fetched.name); +});