mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-27 05:37:59 +01:00
remove tests for now
This commit is contained in:
parent
f555c337ea
commit
ee1cca8fe4
3 changed files with 14 additions and 47 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
|
@ -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
|
Loading…
Reference in a new issue