1
0
Fork 0
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:
Ulisses Herrera Freire de Almeida 2014-06-26 17:53:07 -03:00
parent 4612cb0463
commit 2765f5ae8f

View file

@ -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