Sha256: b365d658ea38954ffc5716d138c78b06f3d4bfc7993f8e6b7cbdb04d0fe9a731

Contents?: true

Size: 687 Bytes

Versions: 20

Compression:

Stored size: 687 Bytes

Contents

require 'test_helper'

class NumberFieldTest < ActionView::TestCase

    test 'number_field' do
      actual = UiBibz::Ui::Core::Forms::Numbers::NumberField.new('mynumber').render
      expected = "<input type=\"number\" name=\"mynumber\" id=\"mynumber\" class=\"form-control\" />"

      assert_equal expected, actual
    end

    test 'number_field with options' do
      actual = UiBibz::Ui::Core::Forms::Numbers::NumberField.new('mynumber', value: 5, min: -9, max: 6, step: 0.2).render
      expected = "<input type=\"number\" name=\"mynumber\" id=\"mynumber\" value=\"5\" class=\"form-control\" min=\"-9\" max=\"6\" step=\"0.2\" />"

      assert_equal expected, actual
    end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
ui_bibz-2.4.0 test/ui/core/forms/numbers/number_field_test.rb
ui_bibz-2.3.15 test/ui/core/forms/numbers/number_field_test.rb
ui_bibz-2.3.14 test/ui/core/forms/numbers/number_field_test.rb
ui_bibz-2.3.13 test/ui/core/forms/numbers/number_field_test.rb
ui_bibz-2.3.12 test/ui/core/forms/numbers/number_field_test.rb
ui_bibz-2.3.11 test/ui/core/forms/numbers/number_field_test.rb
ui_bibz-2.3.10 test/ui/core/forms/numbers/number_field_test.rb
ui_bibz-2.3.9 test/ui/core/forms/numbers/number_field_test.rb
ui_bibz-2.3.8 test/ui/core/forms/numbers/number_field_test.rb
ui_bibz-2.3.7 test/ui/core/forms/numbers/number_field_test.rb
ui_bibz-2.3.6 test/ui/core/forms/numbers/number_field_test.rb
ui_bibz-2.3.5 test/ui/core/forms/numbers/number_field_test.rb
ui_bibz-2.3.4 test/ui/core/forms/numbers/number_field_test.rb
ui_bibz-2.3.3 test/ui/core/forms/numbers/number_field_test.rb
ui_bibz-2.3.2 test/ui/core/forms/numbers/number_field_test.rb
ui_bibz-2.3.1 test/ui/core/forms/numbers/number_field_test.rb
ui_bibz-2.3.0 test/ui/core/forms/numbers/number_field_test.rb
ui_bibz-2.2.2 test/ui/core/forms/numbers/number_field_test.rb
ui_bibz-2.2.1 test/ui/core/forms/numbers/number_field_test.rb
ui_bibz-2.2.0 test/ui/core/forms/numbers/number_field_test.rb