Skip to content

Commit

Permalink
add test for HTTPoisonMock.post! for: dwyl/elixir-auth-github-demo#29
Browse files Browse the repository at this point in the history
  • Loading branch information
nelsonic committed Nov 4, 2023
1 parent 73312b1 commit a6df38c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/elixir_auth_github_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ defmodule ElixirAuthGithubTest do
assert res.scope == "user"
end

test "catch-all mock HTTP.post! returns scope string" do
setup_test_environment_variables()
{:ok, res} = ElixirAuthGithub.github_auth("123456")
assert res.scope == "user"
end

test "github_auth returns an error with a bad code" do
setup_test_environment_variables()
assert ElixirAuthGithub.github_auth("1234") ==
Expand Down

0 comments on commit a6df38c

Please sign in to comment.