sign in user for note and channel tests

This commit is contained in:
Inhji 2023-03-06 19:58:00 +01:00
parent 62b118afe7
commit 25abbf3f16
2 changed files with 4 additions and 0 deletions

View File

@ -17,6 +17,8 @@ defmodule ChiyaWeb.ChannelControllerTest do
}
@invalid_attrs %{content: nil, name: nil, slug: nil, visibility: nil}
setup [:register_and_log_in_user]
describe "index" do
test "lists all channels", %{conn: conn} do
conn = get(conn, ~p"/admin/channels")

View File

@ -21,6 +21,8 @@ defmodule ChiyaWeb.NoteControllerTest do
}
@invalid_attrs %{content: nil, kind: nil, name: nil, published_at: nil, slug: nil, url: nil}
setup [:register_and_log_in_user]
describe "index" do
test "lists all notes", %{conn: conn} do
conn = get(conn, ~p"/admin/notes")