From 25594fa60d688c3585815356860a0eb3b1c19467 Mon Sep 17 00:00:00 2001 From: shibao Date: Sun, 12 Sep 2021 17:57:30 -0400 Subject: [PATCH] remove duplicate accounts fixtures --- test/support/fixtures/accounts_fixtures.ex | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/test/support/fixtures/accounts_fixtures.ex b/test/support/fixtures/accounts_fixtures.ex index 59402686..d777d964 100644 --- a/test/support/fixtures/accounts_fixtures.ex +++ b/test/support/fixtures/accounts_fixtures.ex @@ -25,28 +25,10 @@ defmodule Cannery.AccountsFixtures do token end - def unique_user_email, do: "user#{System.unique_integer()}@example.com" - def valid_user_password, do: "hello world!" - def valid_user_attributes(attrs \\ %{}) do Enum.into(attrs, %{ email: unique_user_email(), password: valid_user_password() }) end - - def user_fixture(attrs \\ %{}) do - {:ok, user} = - attrs - |> valid_user_attributes() - |> Cannery.Accounts.register_user() - - user - end - - def extract_user_token(fun) do - {:ok, captured} = fun.(&"[TOKEN]#{&1}[TOKEN]") - [_, token, _] = String.split(captured.body, "[TOKEN]") - token - end end