16 lines
345 B
Elixir
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
|