loads input option partials on type change
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user