mirror of
https://github.com/heartcombo/simple_form.git
synced 2022-11-09 12:19:26 -05:00
Make sure when a not existent namespace is passed raises error
This commit is contained in:
parent
4612cb0463
commit
2765f5ae8f
1 changed files with 10 additions and 0 deletions
|
@ -90,6 +90,16 @@ class DiscoveryTest < ActionView::TestCase
|
|||
end
|
||||
end
|
||||
|
||||
test 'raises error when configured namespace does not exists' do
|
||||
discovery do
|
||||
swap SimpleForm, custom_inputs_namespaces: ['InvalidNamespace'] do
|
||||
assert_raise NameError do
|
||||
with_form_for @user, :age
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
test 'new inputs can override the input_html_options' do
|
||||
discovery do
|
||||
with_form_for @user, :active, as: :select
|
||||
|
|
Loading…
Reference in a new issue