Skip to content

Commit

Permalink
Add test for live view visiting multiple times
Browse files Browse the repository at this point in the history
  • Loading branch information
sax committed Oct 26, 2024
1 parent 3b58f7c commit 13c42d6
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions test/pages/driver/live_view_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,22 @@ defmodule Test.Driver.LiveViewTest do
use Test.ConnCase, async: true
alias HtmlQuery, as: Hq

test "renders from a live view", %{conn: conn} do
conn
|> Pages.visit("/live")
|> assert_success()
|> assert_driver(:live_view)
|> assert_here("live/show")
describe "visit" do
test "renders from a live view", %{conn: conn} do
conn
|> Pages.visit("/live")
|> assert_success()
|> assert_driver(:live_view)
|> assert_here("live/show")
end

test "may be visited multiple times", %{conn: conn} do
conn
|> Pages.visit("/live")
|> Pages.visit("/live")
|> assert_success()
|> Pages.visit("/live")
end
end

describe "mount redirect" do
Expand Down

0 comments on commit 13c42d6

Please sign in to comment.