mirror of
https://github.com/heartcombo/simple_form.git
synced 2022-11-09 12:19:26 -05:00
we don't need extra iVar for hash backed author
This commit is contained in:
parent
cb64b80fdb
commit
7710c3b0e9
2 changed files with 2 additions and 6 deletions
|
@ -545,10 +545,8 @@ class BuilderTest < ActionView::TestCase
|
|||
end
|
||||
|
||||
test 'fields for with a hash like model yeilds an instance of FormBuilder' do
|
||||
@hash_backed_author = HashBackedAuthor.new
|
||||
|
||||
with_concat_form_for(:user) do |f|
|
||||
f.simple_fields_for(:author, @hash_backed_author) do |author|
|
||||
f.simple_fields_for(:author, HashBackedAuthor.new) do |author|
|
||||
assert author.instance_of?(SimpleForm::FormBuilder)
|
||||
author.input :name
|
||||
end
|
||||
|
|
|
@ -92,9 +92,7 @@ class FormHelperTest < ActionView::TestCase
|
|||
end
|
||||
|
||||
test 'fields for with a hash like model yeilds an instance of FormBuilder' do
|
||||
@hash_backed_author = HashBackedAuthor.new
|
||||
|
||||
with_concat_fields_for(:author, @hash_backed_author) do |f|
|
||||
with_concat_fields_for(:author, HashBackedAuthor.new) do |f|
|
||||
assert f.instance_of?(SimpleForm::FormBuilder)
|
||||
f.input :name
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue