improve (fix) tests

This commit is contained in:
Lili (Tlapka) 2021-09-15 12:23:47 +02:00
parent 42e025af12
commit 05e59e8879
4 changed files with 7 additions and 9 deletions

View File

@ -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

View File

@ -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} =

View File

@ -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)

View File

@ -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