Created
July 15, 2018 13:32
-
-
Save cybrox/f880fbed1b03930f4949e449be18e8d8 to your computer and use it in GitHub Desktop.
Blog: Testing Protected Phoenix Controllers - Snippet 2
This file contains hidden or 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
if @env == :test do | |
defp send_unauthorized_if_not_faked(conn) do | |
# Implement testing backdoor | |
conn | |
end | |
else | |
defp send_unauthorized_if_not_faked(conn) do | |
send_unauthorized_response(conn) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment