ALL TESTS ARE GREEN
This commit is contained in:
parent
92e548e96c
commit
ca0c1a2aa3
4 changed files with 8 additions and 9 deletions
|
@ -7,12 +7,14 @@ defmodule ChiyaWeb.ChannelControllerTest do
|
|||
content: "some content",
|
||||
name: "some name",
|
||||
slug: "some slug",
|
||||
layout: :default,
|
||||
visibility: :public
|
||||
}
|
||||
@update_attrs %{
|
||||
content: "some updated content",
|
||||
name: "some updated name",
|
||||
slug: "some updated slug",
|
||||
layout: :default,
|
||||
visibility: :private
|
||||
}
|
||||
@invalid_attrs %{content: nil, name: nil, slug: nil, visibility: nil}
|
||||
|
|
|
@ -26,7 +26,7 @@ defmodule ChiyaWeb.NoteControllerTest do
|
|||
describe "index" do
|
||||
test "lists all notes", %{conn: conn} do
|
||||
conn = get(conn, ~p"/admin/notes")
|
||||
assert html_response(conn, 200) =~ "Listing Notes"
|
||||
assert html_response(conn, 200) =~ "Notes"
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -45,7 +45,7 @@ defmodule ChiyaWeb.NoteControllerTest do
|
|||
assert redirected_to(conn) == ~p"/admin/notes/#{id}"
|
||||
|
||||
conn = get(conn, ~p"/admin/notes/#{id}")
|
||||
assert html_response(conn, 200) =~ "Note #{id}"
|
||||
assert html_response(conn, 200) =~ @create_attrs.name
|
||||
end
|
||||
|
||||
test "renders errors when data is invalid", %{conn: conn} do
|
||||
|
@ -65,7 +65,7 @@ defmodule ChiyaWeb.NoteControllerTest do
|
|||
assert redirected_to(conn) == ~p"/admin/notes/#{id}"
|
||||
|
||||
conn = get(conn, ~p"/admin/notes/#{id}")
|
||||
assert html_response(conn, 200) =~ "Note #{id}"
|
||||
assert html_response(conn, 200) =~ @create_attrs.name
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -113,7 +113,7 @@ defmodule ChiyaWeb.NoteControllerTest do
|
|||
assert redirected_to(conn) == ~p"/admin/notes/#{note}"
|
||||
|
||||
conn = get(conn, ~p"/admin/notes/#{note}")
|
||||
assert html_response(conn, 200) =~ "some updated content"
|
||||
assert html_response(conn, 200) =~ "some updated name"
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -20,9 +20,7 @@ defmodule ChiyaWeb.UserSessionControllerTest do
|
|||
# Now do a logged in request and assert on the menu
|
||||
conn = get(conn, ~p"/")
|
||||
response = html_response(conn, 200)
|
||||
assert response =~ user.email
|
||||
assert response =~ ~p"/user"
|
||||
assert response =~ ~p"/user/log_out"
|
||||
assert response =~ ~p"/admin"
|
||||
end
|
||||
|
||||
test "logs the user in with remember me", %{conn: conn, user: user} do
|
||||
|
|
|
@ -17,8 +17,7 @@ defmodule Chiya.ChannelsFixtures do
|
|||
attrs
|
||||
|> Enum.into(%{
|
||||
content: "some content",
|
||||
name: "some name",
|
||||
slug: unique_channel_slug(),
|
||||
name: "some name #{System.unique_integer([:positive])}",
|
||||
visibility: :public,
|
||||
layout: :default
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue