Sha256: 0a97b1bac20a737f59ea276401a001e5f3588ba11b231af8a12f9110497fb1b9
Contents?: true
Size: 1.23 KB
Versions: 1
Compression:
Stored size: 1.23 KB
Contents
require 'test_helper' include UiBibz::Helpers class SelectFieldTest < ActionView::TestCase test "Select Field" do options = options_for_select(2.times.map{ |i| "option #{i}" }) actual = UiBibz::Ui::Core::Forms::Selects::SelectField.new('example', option_tags: options).render expected = "<select name=\"example\" id=\"example\" class=\"select-field form-control\"><option value=\"option 0\">option 0</option> <option value=\"option 1\">option 1</option></select>" assert_equal expected, actual end test "Select Field refresh" do actual = UiBibz::Ui::Core::Forms::Selects::SelectField.new('example', refresh: { target: { url: '/' }}).render expected = "<div class=\"input-group select-field-refresh\"><select name=\"example\" id=\"example\" class=\"select-field form-control\"></select><span class=\"input-group-btn\"><button data-connect=\"{"events":"click","mode":"remote","target":{"selector":"#example","url":"/","data":[]}}\" class=\"btn-primary ui-bibz-connect input-refresh-button btn\"><i class=\"glyph fa fa-refresh\"></i> </button></span></div>" assert_equal expected, actual end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ui_bibz-2.0.0.alpha28 | test/ui/core/forms/selects/select_field_test.rb |