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:
parent
37106e33a8
commit
41a9faabc9
@ -1,7 +1,7 @@
|
||||
defmodule Chess.GameControllerTest do
|
||||
use Chess.ConnCase
|
||||
use ChessWeb.ConnCase
|
||||
|
||||
alias Chess.Game
|
||||
alias Chess.Store.Game
|
||||
@valid_attrs %{}
|
||||
|
||||
test "lists all entries on index", %{conn: conn} do
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
defmodule Chess.GamesTest do
|
||||
use Chess.FeatureCase
|
||||
use ChessWeb.FeatureCase
|
||||
|
||||
test "visit homepage" do
|
||||
navigate_to "/"
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
defmodule Chess.GameTest do
|
||||
use Chess.ModelCase
|
||||
|
||||
alias Chess.Game
|
||||
alias Chess.Store.Game
|
||||
|
||||
@valid_attrs %{board: %{}}
|
||||
@invalid_attrs %{}
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
defmodule Chess.FeatureCase do
|
||||
defmodule ChessWeb.FeatureCase do
|
||||
use ExUnit.CaseTemplate
|
||||
|
||||
using do
|
||||
quote do
|
||||
use Chess.ConnCase
|
||||
use ChessWeb.ConnCase
|
||||
|
||||
use Hound.Helpers
|
||||
hound_session()
|
||||
|
||||
@ -1,21 +1,23 @@
|
||||
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
|
||||
import Phoenix.View
|
||||
|
||||
alias ChessWeb.ErrorView
|
||||
|
||||
test "renders 404.html" do
|
||||
assert render_to_string(Chess.ErrorView, "404.html", []) ==
|
||||
assert render_to_string(ErrorView, "404.html", []) ==
|
||||
"Page not found"
|
||||
end
|
||||
|
||||
test "render 500.html" do
|
||||
assert render_to_string(Chess.ErrorView, "500.html", []) ==
|
||||
assert render_to_string(ErrorView, "500.html", []) ==
|
||||
"Internal server error"
|
||||
end
|
||||
|
||||
test "render any other" do
|
||||
assert render_to_string(Chess.ErrorView, "505.html", []) ==
|
||||
assert render_to_string(ErrorView, "505.html", []) ==
|
||||
"Internal server error"
|
||||
end
|
||||
end
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
defmodule Chess.LayoutViewTest do
|
||||
use Chess.ConnCase, async: true
|
||||
use ChessWeb.ConnCase, async: true
|
||||
end
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
defmodule Chess.PageViewTest do
|
||||
use Chess.ConnCase, async: true
|
||||
use ChessWeb.ConnCase, async: true
|
||||
end
|
||||
|
||||
Loading…
Reference in New Issue
Block a user