Add mainly disfunctional test
Due to utter negligence test results are currently: 221 tests, 186 failures
This commit is contained in:
45
test/support/fixtures/public_fixtures.ex
Normal file
45
test/support/fixtures/public_fixtures.ex
Normal file
@ -0,0 +1,45 @@
|
||||
defmodule Outlook.PublicFixtures do
|
||||
@moduledoc """
|
||||
This module defines test helpers for creating
|
||||
entities via the `Outlook.Public` context.
|
||||
"""
|
||||
|
||||
# TODO: make this work
|
||||
|
||||
@doc """
|
||||
Generate an artikel.
|
||||
"""
|
||||
def artikel_fixture(attrs \\ %{}) do
|
||||
{:ok, artikel} =
|
||||
attrs
|
||||
|> Enum.into(%{
|
||||
date: "some date",
|
||||
public_content: "some public_content",
|
||||
teaser: "some teaser",
|
||||
title: "some title",
|
||||
translator: "some translator",
|
||||
unauthorized: true
|
||||
})
|
||||
|> Outlook.Public.create_artikel()
|
||||
|
||||
artikel
|
||||
end
|
||||
|
||||
@doc """
|
||||
Generate an autor.
|
||||
"""
|
||||
def autor_fixture(attrs \\ %{}) do
|
||||
{:ok, autor} =
|
||||
attrs
|
||||
|> Enum.into(%{
|
||||
description: "some description",
|
||||
homepage_name: "some homepage_name",
|
||||
homepage_url: "some homepage_url",
|
||||
name: "some name"
|
||||
})
|
||||
|> Outlook.Public.create_autor()
|
||||
|
||||
autor
|
||||
end
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user