You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
link_shortener/test/support/factories/UserFactory.ex

16 lines
314 B

defmodule LinkShortener.Factories.UserFactory do
use ExMachina
def user_attrs_factory() do
%{
email: sequence(:email, &"user-#{&1}@mail.com"),
password: "some password"
}
end
def create_user() do
user_attrs_factory()
|> LinkShortener.AccountsFixtures.user_fixture()
end
end