analytics / test /plausible_web /controllers /page_controller_test.exs
Leon4gr45's picture
Upload folder using huggingface_hub (part 6)
6778ee0 verified
Raw
History Blame Contribute Delete
535 Bytes
defmodule PlausibleWeb.PageControllerTest do
use PlausibleWeb.ConnCase, async: true
setup {PlausibleWeb.FirstLaunchPlug.Test, :skip}
describe "GET /" do
setup [:create_user, :log_in]
test "shows landing page when user not authenticated" do
assert build_conn() |> get("/") |> html_response(200) =~ "Welcome to Plausible!"
end
test "redirects to /sites if user is authenticated", %{conn: conn} do
assert conn
|> get("/")
|> redirected_to(302) == "/sites"
end
end
end