Skip to content

Instantly share code, notes, and snippets.

@ngw

ngw/test_auth.ex Secret

Created September 21, 2016 15:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ngw/42984797e31fe3fc7e365fe756295a9d to your computer and use it in GitHub Desktop.
Save ngw/42984797e31fe3fc7e365fe756295a9d to your computer and use it in GitHub Desktop.
test "POST wrong attributs to /macaw/services", %{conn: conn} do
user = Owl.UserFactory.insert(:user)
conn |> Guardian.Plug.sign_in(user, :token)
conn = post conn, "/macaw/services",
[ service: [name: "Example service", status: "1",
legacy_notifications: "false", notification_endpoint: "http://example.org/notify" ]]
assert html_response(conn, 200) =~ "can't be blank"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment