Created
November 23, 2021 00:37
-
-
Save ihumanable/eba867b87c309cdc68c6ee04630fde34 to your computer and use it in GitHub Desktop.
Invalid Message Test Case with Patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Discord.Test do | |
use ExUnit.Case | |
use Patch | |
describe "send_message/1" do | |
test "errors on invalid messages" do | |
patch(Discord, :validate_message, {:error, :bad}) | |
assert {:error, :bad} == Discord.send_message(%Message{}) | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment