improve changesets and typespecs

This commit is contained in:
2022-11-23 20:46:41 -05:00
parent 20a2311229
commit e0ac714681
38 changed files with 191 additions and 189 deletions

View File

@ -104,7 +104,7 @@ defmodule Cannery.AccountsTest do
describe "change_user_registration/2" do
test "returns a changeset" do
assert %Changeset{} = changeset = Accounts.change_user_registration(%User{})
assert %Changeset{} = changeset = Accounts.change_user_registration()
assert changeset.required == [:password, :email]
end
@ -112,8 +112,7 @@ defmodule Cannery.AccountsTest do
email = unique_user_email()
password = valid_user_password()
changeset =
Accounts.change_user_registration(%User{}, %{"email" => email, "password" => password})
changeset = Accounts.change_user_registration(%{"email" => email, "password" => password})
assert changeset.valid?
assert get_change(changeset, :email) == email