23 lines
435 B
Elixir
23 lines
435 B
Elixir
|
defmodule Exmr.ExamsFixtures do
|
||
|
@moduledoc """
|
||
|
This module defines test helpers for creating
|
||
|
entities via the `Exmr.Exams` context.
|
||
|
"""
|
||
|
|
||
|
@doc """
|
||
|
Generate a exam.
|
||
|
"""
|
||
|
def exam_fixture(attrs \\ %{}) do
|
||
|
{:ok, exam} =
|
||
|
attrs
|
||
|
|> Enum.into(%{
|
||
|
date: ~D[2024-11-13],
|
||
|
description: "some description",
|
||
|
subject: "some subject"
|
||
|
})
|
||
|
|> Exmr.Exams.create_exam()
|
||
|
|
||
|
exam
|
||
|
end
|
||
|
end
|