Skip to content

Commit

Permalink
tests(Structs): give already struct test non default data
Browse files Browse the repository at this point in the history
  • Loading branch information
SpaceEEC committed Nov 3, 2018
1 parent e6a8f4f commit f02424f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/structs.ex
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,11 @@ defmodule Crux.Structs do
]
# Does not alter already structs
iex> Crux.Structs.create(%Crux.Structs.Member{}, Crux.Structs.Member)
%Crux.Structs.Member{}
iex> Crux.Structs.create(
...> %Crux.Structs.User{username: "space", discriminator: "0001", id: 218348062828003328, avatar: "46a356e237350bf8b8dfde15667dfc4"},
...> Crux.Structs.User
...> )
%Crux.Structs.User{username: "space", discriminator: "0001", id: 218348062828003328, avatar: "46a356e237350bf8b8dfde15667dfc4"}
# Fallback
iex> Crux.Structs.create(nil, nil)
Expand Down

0 comments on commit f02424f

Please sign in to comment.