sloanelybutsurely.com/test/cms_web/controllers/post_controller_test.exs
2025-02-25 17:00:47 -05:00

16 lines
345 B
Elixir

defmodule CMSWeb.PostControllerTest do
use CMSWeb.ConnCase, async: true
import CMS.Factory
describe "GET /writing/:post_id" do
test "includes the title", %{conn: conn} do
post = insert(:post)
conn
|> visit(~p"/writing/#{post}")
|> assert_has("h1", text: post.title)
|> open_browser()
end
end
end