19 lines
517 B
Elixir
19 lines
517 B
Elixir
defmodule FriendsWeb.FriendsLiveTest do
|
|
use FriendsWeb.ConnCase, async: true
|
|
import Friends.{AccountsFixtures, FriendsFixtures}
|
|
|
|
setup do
|
|
%{
|
|
user: _user,
|
|
friend: _friend
|
|
} = friend_fixture(%{email: user_fixture().email}) |> Friends.Friend.assign_user()
|
|
end
|
|
|
|
describe "GET '/friends/:slug'" do
|
|
test "shows the friend overview", %{conn: conn, friend: friend} do
|
|
conn = conn |> get("/friends/#{friend.slug}")
|
|
assert html_response(conn, 200) =~ friend.name
|
|
end
|
|
end
|
|
end
|