mirror of
https://github.com/ash-project/ash_phoenix.git
synced 2024-09-19 06:42:47 +12:00
test: add failing test for remove_form (#39)
This commit is contained in:
parent
50f6a108b4
commit
b65bf57ebf
1 changed files with 9 additions and 0 deletions
|
@ -190,6 +190,15 @@ defmodule AshPhoenix.FormTest do
|
|||
assert form.changed?
|
||||
end
|
||||
|
||||
test "removing a non-existant form should not change touched_forms" do
|
||||
form =
|
||||
Post
|
||||
|> Form.for_create(:create, api: Api, forms: [auto?: true])
|
||||
|> AshPhoenix.Form.remove_form([:author])
|
||||
|
||||
assert MapSet.member?(form.touched_forms, "author") == false
|
||||
end
|
||||
|
||||
test "removing a form that was added does not mark the form as changed" do
|
||||
post =
|
||||
Post
|
||||
|
|
Loading…
Reference in a new issue