info and help with test

This commit is contained in:
Owen
2024-12-14 00:17:30 +01:00
parent 5975458407
commit 5d6e632a1d
10 changed files with 146 additions and 3 deletions
+3 -3
View File
@@ -3,14 +3,14 @@ defmodule PlantIdDiscordBotTest.Cog.Source do
@source Application.compile_env(:plantid_discord_bot, :source)
test "source" do
interaction = %{data: %{name: "source"}}
test "/source" do
{:ok, response} = PlantIdDiscordBot.Cog.Info.source(%{data: %{name: "source"}})
expected_response = %{
type: 4,
data: %{content: @source}
}
assert PlantIdDiscordBot.Cog.Info.source(interaction) == {:ok, expected_response}
assert response == expected_response
end
end