Skip to content

Commit 5993b94

Browse files
committed
build: update seed movies
1 parent 1391ad3 commit 5993b94

File tree

11 files changed

+456
-118
lines changed

11 files changed

+456
-118
lines changed
Binary file not shown.
Binary file not shown.
Binary file not shown.
5.88 MB
Binary file not shown.
5.88 MB
Binary file not shown.
5.88 MB
Binary file not shown.
5.88 MB
Binary file not shown.

dev/radarr/movies.json

Lines changed: 438 additions & 100 deletions
Large diffs are not rendered by default.

test/media_server_web/controllers/search_controller_test.exs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
defmodule SearchControllerTest do
22
use MediaServerWeb.ConnCase
33

4-
setup do
5-
%{user: MediaServer.AccountsFixtures.user_fixture()}
4+
setup %{conn: conn} do
5+
user = MediaServer.AccountsFixtures.user_fixture()
6+
movie = MediaServer.Repo.get_by(MediaServer.Movies, id: 1)
7+
8+
%{conn: conn, user: user, movie: movie}
69
end
710

8-
test "it should have a movie", %{conn: conn, user: user} do
9-
conn = get(conn, ~p"/api/search?query=cam&token=#{user.api_token.token}")
11+
test "it should have a movie", %{conn: conn, user: user, movie: movie} do
12+
conn = get(conn, ~p"/api/search?query=#{movie.title}&token=#{user.api_token.token}")
1013

1114
[first | _] = json_response(conn, 200)["data"]["movies"]
1215

test/media_server_web/live/movies_live_test.exs

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,22 @@ defmodule MediaServerWeb.MoviesLiveTest do
1010
%{conn: conn |> log_in_user(user), user: user, movie: movie}
1111
end
1212

13-
test "it should render index", %{conn: conn} do
14-
{:ok, _view, disconnected_html} = live(conn, Routes.movies_index_path(conn, :index))
13+
test "it should render index", %{conn: conn, movie: movie} do
14+
{:ok, _view, disconnected_html} = live(conn, ~p"/movies")
1515

16-
assert disconnected_html =~ "Caminandes: Llama Drama"
17-
assert disconnected_html =~ "Caminandes: Gran Dillama"
18-
assert disconnected_html =~ "Caminandes: Llamigos"
16+
assert disconnected_html =~ "/movies/#{movie.id}"
1917
end
2018

21-
test "it should render index paged", %{conn: conn} do
22-
{:ok, _view, disconnected_html} =
23-
live(conn, Routes.movies_index_path(conn, :index, page: "1"))
19+
test "it should render index paged", %{conn: conn, movie: movie} do
20+
{:ok, _view, disconnected_html} = live(conn, ~p"/movies?page=1")
2421

25-
assert disconnected_html =~ "Caminandes: Llama Drama"
26-
assert disconnected_html =~ "Caminandes: Gran Dillama"
27-
assert disconnected_html =~ "Caminandes: Llamigos"
22+
assert disconnected_html =~ "/movies/#{movie.id}"
2823
end
2924

3025
test "it should render show", %{conn: conn, movie: movie} do
31-
{:ok, _view, _disconnected_html} = live(conn, ~p"/movies/#{movie.id}")
26+
{:ok, _view, disconnected_html} = live(conn, ~p"/movies/#{movie.id}")
27+
28+
assert disconnected_html =~ movie.title
3229
end
3330

3431
test "it should watch", %{conn: conn, movie: movie} do

0 commit comments

Comments
 (0)