create gists
This commit is contained in:
parent
79a17290d5
commit
43a8412f06
90 changed files with 1777 additions and 2107 deletions
21
test/support/fixtures/gists_fixtures.ex
Normal file
21
test/support/fixtures/gists_fixtures.ex
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
defmodule Zoeyscomputer.GistsFixtures do
|
||||
@moduledoc """
|
||||
This module defines test helpers for creating
|
||||
entities via the `Zoeyscomputer.Gists` context.
|
||||
"""
|
||||
|
||||
@doc """
|
||||
Generate a gist.
|
||||
"""
|
||||
def gist_fixture(attrs \\ %{}) do
|
||||
{:ok, gist} =
|
||||
attrs
|
||||
|> Enum.into(%{
|
||||
code: "some code",
|
||||
lang: "some lang"
|
||||
})
|
||||
|> Zoeyscomputer.Gists.create_gist()
|
||||
|
||||
gist
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue