fourletters_controller_test.exs 472 B

12345678910111213141516
  1. defmodule FourlettersWeb.FourlettersControllerTest do
  2. use FourlettersWeb.ConnCase
  3. # test "GET /", %{conn: conn} do
  4. # conn = get(conn, "/")
  5. # assert html_response(conn, 200) =~ "4-letters.net"
  6. # end
  7. test "GET /?fourletters=test", %{conn: conn} do
  8. conn = get(conn, "/?fourletters=test")
  9. assert html_response(conn, 302) =~ "redirected"
  10. assert %{fourletters: "test"} = redirected_params(conn)
  11. assert redirected_to(conn) == "/test"
  12. end
  13. end