You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: test/bootstrap_form_test.rb
+7-7Lines changed: 7 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -333,12 +333,12 @@ def setup
333
333
end
334
334
335
335
test"radio_button is wrapped correctly"do
336
-
expected=%{<label class="radio"><input id="user_misc_1" name="user[misc]" type="radio" value="1" /> This is a radio button</label>}
336
+
expected=%{<div class="radio"><label for="user_misc_1"><input id="user_misc_1" name="user[misc]" type="radio" value="1" /> This is a radio button</label></div>}
337
337
assert_equalexpected,@builder.radio_button(:misc,'1',label: 'This is a radio button')
338
338
end
339
339
340
340
test"radio_button inline label is set correctly"do
341
-
expected=%{<label class="radio-inline"><input id="user_misc_1" name="user[misc]" type="radio" value="1" /> This is a radio button</label>}
341
+
expected=%{<label class="radio-inline" for="user_misc_1"><input id="user_misc_1" name="user[misc]" type="radio" value="1" /> This is a radio button</label>}
342
342
assert_equalexpected,@builder.radio_button(:misc,'1',label: 'This is a radio button',inline: true)
test'collection_radio_buttons renders the form_group correctly'do
611
611
collection=[Address.new(id: 1,street: 'Foobar')]
612
-
expected=%{<div class="form-group"><label class="control-label" for="user_misc">This is a radio button collection</label><label class="radio"><input id="user_misc_1" name="user[misc]" type="radio" value="1" /> Foobar</label><span class="help-block">With a help!</span></div>}
612
+
expected=%{<div class="form-group"><label class="control-label" for="user_misc">This is a radio button collection</label><div class="radio"><label for="user_misc_1"><input id="user_misc_1" name="user[misc]" type="radio" value="1" /> Foobar</label></div><span class="help-block">With a help!</span></div>}
613
613
614
614
assert_equalexpected,@builder.collection_radio_buttons(:misc,collection,:id,:street,label: 'This is a radio button collection',help: 'With a help!')
0 commit comments