improve (fix) tests
This commit is contained in:
parent
42e025af12
commit
05e59e8879
|
@ -2,8 +2,6 @@ defmodule PokemonCoutureWeb.ClothesTrackerLive do
|
||||||
use PokemonCoutureWeb, :live_view
|
use PokemonCoutureWeb, :live_view
|
||||||
|
|
||||||
alias PokemonCouture.Shops
|
alias PokemonCouture.Shops
|
||||||
alias PokemonCouture.Shops.Clothes
|
|
||||||
alias PokemonCouture.Live.Components.ClothesComponent
|
|
||||||
alias PokemonCouture.Accounts
|
alias PokemonCouture.Accounts
|
||||||
|
|
||||||
def create_shop_map(clothes, map) do
|
def create_shop_map(clothes, map) do
|
||||||
|
|
|
@ -6,9 +6,9 @@ defmodule PokemonCouture.ShopsTest do
|
||||||
describe "clothes" do
|
describe "clothes" do
|
||||||
alias PokemonCouture.Shops.Clothes
|
alias PokemonCouture.Shops.Clothes
|
||||||
|
|
||||||
@valid_attrs %{game: "some game", location: "some location", name: "some name"}
|
@valid_attrs %{game: "some game", location: "some location", name: "some name", color: "some color"}
|
||||||
@update_attrs %{game: "some updated game", location: "some updated location", name: "some updated name"}
|
@update_attrs %{game: "some updated game", location: "some updated location", name: "some updated name", color: "some updated color"}
|
||||||
@invalid_attrs %{game: nil, location: nil, name: nil}
|
@invalid_attrs %{game: nil, location: nil, name: nil, color: nil}
|
||||||
|
|
||||||
def clothes_fixture(attrs \\ %{}) do
|
def clothes_fixture(attrs \\ %{}) do
|
||||||
{:ok, clothes} =
|
{:ok, clothes} =
|
||||||
|
|
|
@ -3,9 +3,9 @@ defmodule PokemonCoutureWeb.ClothesControllerTest do
|
||||||
|
|
||||||
alias PokemonCouture.Shops
|
alias PokemonCouture.Shops
|
||||||
|
|
||||||
@create_attrs %{game: "some game", location: "some location", name: "some name"}
|
@create_attrs %{game: "some game", location: "some location", name: "some name", color: "some color"}
|
||||||
@update_attrs %{game: "some updated game", location: "some updated location", name: "some updated name"}
|
@update_attrs %{game: "some updated game", location: "some updated location", name: "some updated name", colo: "some updated color"}
|
||||||
@invalid_attrs %{game: nil, location: nil, name: nil}
|
@invalid_attrs %{game: nil, location: nil, name: nil, color: nil}
|
||||||
|
|
||||||
def fixture(:clothes) do
|
def fixture(:clothes) do
|
||||||
{:ok, clothes} = Shops.create_clothes(@create_attrs)
|
{:ok, clothes} = Shops.create_clothes(@create_attrs)
|
||||||
|
|
|
@ -3,6 +3,6 @@ defmodule PokemonCoutureWeb.PageControllerTest do
|
||||||
|
|
||||||
test "GET /", %{conn: conn} do
|
test "GET /", %{conn: conn} do
|
||||||
conn = get(conn, "/")
|
conn = get(conn, "/")
|
||||||
assert html_response(conn, 200) =~ "Welcome to Phoenix!"
|
assert html_response(conn, 200) =~ "Welcome to Pokémon Couture!"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue