-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
3 changed files
with
7 additions
and
8 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,15 +9,13 @@ defmodule ElixirAuthGoogle.HTTPoisonMock do | |
Obviously, don't invoke it from your App unless you want people to see fails. | ||
""" | ||
def get("https://www.googleapis.com/oauth2/v3/userinfo?access_token=wrong_token") do | ||
# IO.inspect("HTTPoisonMock.get access_token=wrong_token") | ||
{:error, :bad_request} | ||
end | ||
|
||
@doc """ | ||
get/1 using a dummy _url to test body decoding. | ||
""" | ||
def get(_url) do | ||
# IO.inspect("HTTPoisonMock.get %{name: dwyl}") | ||
{:ok, %{body: Poison.encode!( | ||
%{ | ||
email: "[email protected]", | ||
|
@@ -36,7 +34,6 @@ defmodule ElixirAuthGoogle.HTTPoisonMock do | |
post/2 passing in dummy _url & _body to test return of access_token. | ||
""" | ||
def post(_url, _body) do | ||
# IO.inspect("HTTPoisonMock.post %{ccess_token: token1}") | ||
{:ok, %{body: Poison.encode!(%{access_token: "token1"})}} | ||
end | ||
end |
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