defmodule Bright.StreamsFixtures do @moduledoc """ This module defines test helpers for creating entities via the `Bright.Streams` context. """ @doc """ Generate a stream. """ def stream_fixture(attrs \\ %{}) do {:ok, stream} = attrs |> Enum.into(%{ date: ~U[2024-12-28 03:31:00Z], notes: "some notes", title: "some title" }) |> Bright.Streams.create_stream() stream end @doc """ Generate a vod. """ def vod_fixture(attrs \\ %{}) do {:ok, vod} = attrs |> Enum.into(%{ ipfs_cid: "some ipfs_cid", s3_cdn_url: "some s3_cdn_url", torrent: "some torrent", playlist_url: "some playlist_url", thumbnail_url: "some thumbnail_url" }) |> Bright.Streams.create_vod() vod end end