Add mainly disfunctional test
Due to utter negligence test results are currently: 221 tests, 186 failures
This commit is contained in:
@ -4,6 +4,8 @@ defmodule Outlook.ArticlesFixtures do
|
||||
entities via the `Outlook.Articles` context.
|
||||
"""
|
||||
|
||||
# TODO: make this work
|
||||
|
||||
@doc """
|
||||
Generate a article.
|
||||
"""
|
||||
@ -11,11 +13,17 @@ defmodule Outlook.ArticlesFixtures do
|
||||
{:ok, article} =
|
||||
attrs
|
||||
|> Enum.into(%{
|
||||
content: "some content",
|
||||
content: [%Outlook.InternalTree.InternalNode{name: "p", attributes: %{}, type: :element, nid: "54e8cedb-6459-4605-8301-367758675bb8", content: [
|
||||
%Outlook.InternalTree.TranslationUnit{status: :untranslated, nid: "c0fcdf61-ae2d-482e-81b4-9b6e3baacd8b",
|
||||
content: "A sentence with many letters <a href=\"dingsda.com\">and many, many <b>words. </b></a>"},
|
||||
%Outlook.InternalTree.TranslationUnit{status: :untranslated, nid: "eac12d97-623d-4237-9f33-666298c7f494",
|
||||
content: "<a href=\"dingsda.com\"><b>A</b> sentence</a> with many letters and many, many words. "}],
|
||||
eph: %{sibling_with: :block}}],
|
||||
date: ~U[2022-12-25 16:16:00Z],
|
||||
language: "some language",
|
||||
language: "EN",
|
||||
title: "some title",
|
||||
url: "some url"
|
||||
url: "some url",
|
||||
author_id: 1
|
||||
})
|
||||
|> Outlook.Articles.create_article()
|
||||
|
||||
|
||||
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
|
||||
@ -4,6 +4,8 @@ defmodule Outlook.TranslationsFixtures do
|
||||
entities via the `Outlook.Translations` context.
|
||||
"""
|
||||
|
||||
# TODO: make this work
|
||||
|
||||
@doc """
|
||||
Generate a translation.
|
||||
"""
|
||||
@ -17,7 +19,8 @@ defmodule Outlook.TranslationsFixtures do
|
||||
public: true,
|
||||
teaser: "some teaser",
|
||||
title: "some title",
|
||||
unauthorized: true
|
||||
unauthorized: true,
|
||||
article_id: 1
|
||||
})
|
||||
|> Outlook.Translations.create_translation()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user