1
0
mirror of https://github.com/danbee/chess synced 2025-03-04 08:39:06 +00:00

Fix up tests after 1.3 upgrade

This commit is contained in:
Daniel Barber 2018-01-15 16:06:00 -05:00
parent 37106e33a8
commit 41a9faabc9
Signed by: danbarber
GPG Key ID: 931D8112E0103DD8
7 changed files with 14 additions and 12 deletions

View File

@ -1,7 +1,7 @@
defmodule Chess.GameControllerTest do defmodule Chess.GameControllerTest do
use Chess.ConnCase use ChessWeb.ConnCase
alias Chess.Game alias Chess.Store.Game
@valid_attrs %{} @valid_attrs %{}
test "lists all entries on index", %{conn: conn} do test "lists all entries on index", %{conn: conn} do

View File

@ -1,5 +1,5 @@
defmodule Chess.GamesTest do defmodule Chess.GamesTest do
use Chess.FeatureCase use ChessWeb.FeatureCase
test "visit homepage" do test "visit homepage" do
navigate_to "/" navigate_to "/"

View File

@ -1,7 +1,7 @@
defmodule Chess.GameTest do defmodule Chess.GameTest do
use Chess.ModelCase use Chess.ModelCase
alias Chess.Game alias Chess.Store.Game
@valid_attrs %{board: %{}} @valid_attrs %{board: %{}}
@invalid_attrs %{} @invalid_attrs %{}

View File

@ -1,9 +1,9 @@
defmodule Chess.FeatureCase do defmodule ChessWeb.FeatureCase do
use ExUnit.CaseTemplate use ExUnit.CaseTemplate
using do using do
quote do quote do
use Chess.ConnCase use ChessWeb.ConnCase
use Hound.Helpers use Hound.Helpers
hound_session() hound_session()

View File

@ -1,21 +1,23 @@
defmodule Chess.ErrorViewTest do defmodule Chess.ErrorViewTest do
use Chess.ConnCase, async: true use ChessWeb.ConnCase, async: true
# Bring render/3 and render_to_string/3 for testing custom views # Bring render/3 and render_to_string/3 for testing custom views
import Phoenix.View import Phoenix.View
alias ChessWeb.ErrorView
test "renders 404.html" do test "renders 404.html" do
assert render_to_string(Chess.ErrorView, "404.html", []) == assert render_to_string(ErrorView, "404.html", []) ==
"Page not found" "Page not found"
end end
test "render 500.html" do test "render 500.html" do
assert render_to_string(Chess.ErrorView, "500.html", []) == assert render_to_string(ErrorView, "500.html", []) ==
"Internal server error" "Internal server error"
end end
test "render any other" do test "render any other" do
assert render_to_string(Chess.ErrorView, "505.html", []) == assert render_to_string(ErrorView, "505.html", []) ==
"Internal server error" "Internal server error"
end end
end end

View File

@ -1,3 +1,3 @@
defmodule Chess.LayoutViewTest do defmodule Chess.LayoutViewTest do
use Chess.ConnCase, async: true use ChessWeb.ConnCase, async: true
end end

View File

@ -1,3 +1,3 @@
defmodule Chess.PageViewTest do defmodule Chess.PageViewTest do
use Chess.ConnCase, async: true use ChessWeb.ConnCase, async: true
end end