Sha256: e6ab85122f14db99d763deb7a0f939ce3705543c3fcb37cff7aa260b304dfa14

Contents?: true

Size: 1.26 KB

Versions: 29

Compression:

Stored size: 1.26 KB

Contents

require 'test_helper'
require File.join(File.dirname(__FILE__), '../../lib/active_scaffold/bridges/date_picker/ext')
# require File.join(File.dirname(__FILE__), '../../lib/active_scaffold/bridges/date_picker/helper')

class DatePickerTest < ActionView::TestCase
  include ActiveScaffold::Helpers::ViewHelpers
  include ActiveScaffold::Bridges::DatePicker::Helper::FormColumnHelpers
  include ActiveScaffold::Bridges::DatePicker::Helper::DatepickerColumnHelpers

  def setup
    @controller.class.class_eval do
      include ActiveScaffold::Finder
    end
  end

  def test_set_form_ui
    config = ActiveScaffold::Config::Core.new(:company)
    assert_equal nil, config.columns[:name].form_ui, 'form_ui for name'
    assert_equal :date_picker, config.columns[:date].form_ui, 'form_ui for date'
    assert_equal :datetime_picker, config.columns[:datetime].form_ui, 'form_ui for datetime'
  end

  def test_form_ui
    config = ActiveScaffold::Config::Core.new(:company)
    @record = Company.new
    assert active_scaffold_input_date_picker(config.columns[:date], :name => 'record[date]', :id => 'record_date', :object => @record)
    assert active_scaffold_input_date_picker(config.columns[:datetime], :name => 'record[datetime]', :id => 'record_datetime', :object => @record)
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
active_scaffold-3.4.43 test/bridges/date_picker_test.rb
active_scaffold-3.4.42 test/bridges/date_picker_test.rb
active_scaffold-3.4.41.1 test/bridges/date_picker_test.rb
active_scaffold-3.4.41 test/bridges/date_picker_test.rb
active_scaffold-3.4.40 test/bridges/date_picker_test.rb
active_scaffold-3.4.39 test/bridges/date_picker_test.rb
active_scaffold-3.4.38 test/bridges/date_picker_test.rb
active_scaffold-3.4.37 test/bridges/date_picker_test.rb
active_scaffold-3.4.36 test/bridges/date_picker_test.rb
active_scaffold-3.4.35 test/bridges/date_picker_test.rb
active_scaffold-3.4.34 test/bridges/date_picker_test.rb
active_scaffold-3.4.33 test/bridges/date_picker_test.rb
active_scaffold-3.4.32 test/bridges/date_picker_test.rb
active_scaffold-3.4.31 test/bridges/date_picker_test.rb
active_scaffold-3.4.30 test/bridges/date_picker_test.rb
active_scaffold-3.4.29 test/bridges/date_picker_test.rb
active_scaffold-3.4.28 test/bridges/date_picker_test.rb
active_scaffold-3.4.27 test/bridges/date_picker_test.rb
active_scaffold-3.4.26 test/bridges/date_picker_test.rb
active_scaffold-3.4.25 test/bridges/date_picker_test.rb