defmodule Outlook.ArticlesFixtures do
  @moduledoc """
  This module defines test helpers for creating
  entities via the `Outlook.Articles` context.
  """

  @doc """
  Generate a article.
  """
  def article_fixture(attrs \\ %{}) do
    {:ok, article} =
      attrs
      |> Enum.into(%{
        content: "some content",
        date: ~U[2022-12-25 16:16:00Z],
        language: "some language",
        title: "some title",
        url: "some url"
      })
      |> Outlook.Articles.create_article()

    article
  end
end
