loads input option partials on type change

This commit is contained in:
Mark Moser
2016-08-22 16:24:00 -05:00
parent bdec83b3b6
commit 488b89ddfa
7 changed files with 49 additions and 13 deletions

View File

@ -72,5 +72,20 @@ module Admin
assert :success
assert_match(/failed/i, session[:flash].values.join)
end
test "should gracefully fail input_type" do
get admin_question_option_form_url(input_type: 'fooBarBaz')
assert :success
assigns :locals
end
test "should return partial for new radio" do
get admin_question_option_form_url(input_type: 'radio')
assert :success
assigns :locals
assert_select "input[id^=question_multi_choice_]"
end
end
end