remove tests for now

This commit is contained in:
Luna D 2021-11-08 11:23:06 +01:00
parent f555c337ea
commit ee1cca8fe4
No known key found for this signature in database
GPG key ID: 81AF416F2CC36FC8
3 changed files with 14 additions and 47 deletions

View file

@ -6,24 +6,25 @@ defmodule Philomena.ModerationLogsTest do
describe "moderation_logs" do
alias Philomena.ModerationLogs.ModerationLog
import Philomena.ModerationLogsFixtures
import Philomena.UsersFixtures
@invalid_attrs %{}
test "create_moderation_log/4 with valid data creates a moderation_log" do
user = user_fixture()
test "list_moderation_logs/0 returns all moderation_logs" do
moderation_log = moderation_log_fixture()
assert ModerationLogs.list_moderation_logs() == [moderation_log]
assert {:ok, %ModerationLog{} = _moderation_log} =
ModerationLogs.create_moderation_log(
user,
"User:update",
"/path/to/subject",
"Updated user"
)
end
test "create_moderation_log/1 with valid data creates a moderation_log" do
valid_attrs = %{}
test "create_moderation_log/4 with invalid data returns error changeset" do
user = user_fixture()
assert {:ok, %ModerationLog{} = moderation_log} =
ModerationLogs.create_moderation_log(valid_attrs)
end
test "create_moderation_log/1 with invalid data returns error changeset" do
assert {:error, %Ecto.Changeset{}} = ModerationLogs.create_moderation_log(@invalid_attrs)
assert {:error, %Ecto.Changeset{}} =
ModerationLogs.create_moderation_log(user, nil, nil, nil)
end
end
end

View file

@ -1,16 +0,0 @@
defmodule PhilomenaWeb.ModerationLogControllerTest do
use PhilomenaWeb.ConnCase
import Philomena.ModerationLogsFixtures
@create_attrs %{}
@update_attrs %{}
@invalid_attrs %{}
describe "index" do
test "lists all moderation_logs", %{conn: conn} do
conn = get(conn, Routes.moderation_log_path(conn, :index))
assert html_response(conn, 200) =~ "Listing Moderation logs"
end
end
end

View file

@ -1,18 +0,0 @@
defmodule Philomena.ModerationLogsFixtures do
@moduledoc """
This module defines test helpers for creating
entities via the `Philomena.ModerationLogs` context.
"""
@doc """
Generate a moderation_log.
"""
def moderation_log_fixture(attrs \\ %{}) do
{:ok, moderation_log} =
attrs
|> Enum.into(%{})
|> Philomena.ModerationLogs.create_moderation_log()
moderation_log
end
end