Skip to content

Commit

Permalink
Add test for new preload profile feature
Browse files Browse the repository at this point in the history
  • Loading branch information
loop-index committed Nov 19, 2024
1 parent d2f11f7 commit 8750b76
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,15 @@ defmodule PinchflatWeb.MediaProfileControllerTest do

refute html_response(conn, 200) =~ "MENU"
end

test "preloads some attributes when using a template", %{conn: conn} do
profile = media_profile_fixture(name: "My first profile", download_subs: true, sub_langs: "de")

conn = get(conn, ~p"/media_profiles/new", %{"template_id" => profile.id})
assert html_response(conn, 200) =~ "New Media Profile"
assert html_response(conn, 200) =~ profile.sub_langs
refute html_response(conn, 200) =~ profile.name
end
end

describe "edit media_profile" do
Expand Down

0 comments on commit 8750b76

Please sign in to comment.