Skip to content

Commit

Permalink
Add test for filtering
Browse files Browse the repository at this point in the history
  • Loading branch information
zacksiri committed Feb 28, 2024
1 parent 76765ed commit 65d2da2
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/polar_web/live/root_live_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ defmodule PolarWeb.RootLiveTest do
alias Polar.Streams
alias Polar.Streams.Product

import Phoenix.LiveViewTest
import Polar.AccountsFixtures

setup do
Expand Down Expand Up @@ -82,4 +83,18 @@ defmodule PolarWeb.RootLiveTest do

assert html_response(conn, 200)
end

describe "filter" do
test "render only filtered os" do
{:ok, _lv, html} = live(build_conn(), ~p"/?os=alpine")

assert html =~ "3.19"
end

test "does not render anything" do
{:ok, _lv, html} = live(build_conn(), ~p"/?os=strange")

refute html =~ "3.19"
end
end
end

0 comments on commit 65d2da2

Please sign in to comment.