Sha256: 8ab3e354edfbd36b6b7d4f89210af645112827234d141ef290072dc908dea113
Contents?: true
Size: 1.4 KB
Versions: 3
Compression:
Stored size: 1.4 KB
Contents
require File.dirname(__FILE__) + '/../test_helper' class FormTagHelperTest < ActionView::TestCase def test_should_style_text_field_tag assert_equal '<input class="text" id="name" name="name" type="text" />', text_field_tag('name') end def test_should_not_style_hidden_field_tag assert_equal '<input id="name" name="name" type="hidden" />', hidden_field_tag('name') end def test_should_style_file_field_tag assert_equal '<input class="file" id="picture" name="picture" type="file" />', file_field_tag('picture') end def test_should_style_password_field_tag assert_equal '<input class="password" id="secret" name="secret" type="password" />', password_field_tag('secret') end def test_should_style_check_box_tag assert_equal '<input class="checkbox" id="agree" name="agree" type="checkbox" value="1" />', check_box_tag('agree') end def test_should_style_radio_button_tag assert_equal '<input class="radio" id="agree_1" name="agree" type="radio" value="1" />', radio_button_tag('agree', 1) end def test_should_style_submit_tag assert_equal '<input class="submit" name="commit" type="submit" value="Submit" />', submit_tag('Submit') end def test_should_style_image_submit_tag assert_equal '<input class="image" src="button.png" type="image" />', image_submit_tag('button.png') end private def path_to_image(source) source end end
Version data entries
3 entries across 3 versions & 2 rubygems
Version | Path |
---|---|
pluginaweek-styled_inputs-0.1.1 | test/helpers/form_tag_helper_test.rb |
styled_inputs-0.1.2 | test/helpers/form_tag_helper_test.rb |
styled_inputs-0.1.1 | test/helpers/form_tag_helper_test.rb |