Sha256: 032d0b2d82f9a729c5750cfd8a892f31b45d1b2c4b663636fc6c7b5c23da53d3

Contents?: true

Size: 548 Bytes

Versions: 32

Compression:

Stored size: 548 Bytes

Contents

require 'test_helper'

module PushType
  class DateFieldTest < ActiveSupport::TestCase

    class TestPage < PushType::Node
      field :foo, :date
    end

    let(:node)  { TestPage.create FactoryGirl.attributes_for(:node, foo: date.to_s) }
    let(:date)  { Date.today }
    let(:field) { node.fields[:foo] }
    
    it { field.template.must_equal 'date' }
    it { field.form_helper.must_equal :date_field }
    it { field.json_value.must_equal date.to_s }
    it { field.value.must_equal date }

    it { node.foo.must_equal date }

  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
push_type_core-0.11.2 test/fields/push_type/date_field_test.rb
push_type_core-0.11.1 test/fields/push_type/date_field_test.rb
push_type_core-0.11.0.beta.2 test/fields/push_type/date_field_test.rb
push_type_core-0.11.0.beta.1 test/fields/push_type/date_field_test.rb
push_type_core-0.10.4 test/fields/push_type/date_field_test.rb
push_type_core-0.10.3 test/fields/push_type/date_field_test.rb
push_type_core-0.10.2 test/fields/push_type/date_field_test.rb
push_type_core-0.10.1 test/fields/push_type/date_field_test.rb
push_type_core-0.10.0 test/fields/push_type/date_field_test.rb
push_type_core-0.10.0.beta.5 test/fields/push_type/date_field_test.rb
push_type_core-0.10.0.beta.3 test/fields/push_type/date_field_test.rb
push_type_core-0.9.5 test/fields/push_type/date_field_test.rb
push_type_core-0.9.3 test/fields/push_type/date_field_test.rb
push_type_core-0.9.2 test/fields/push_type/date_field_test.rb
push_type_core-0.9.1 test/fields/push_type/date_field_test.rb
push_type_core-0.9.0 test/fields/push_type/date_field_test.rb
push_type_core-0.9.0.beta.4 test/fields/push_type/date_field_test.rb
push_type_core-0.9.0.beta.3 test/fields/push_type/date_field_test.rb
push_type_core-0.9.0.beta.2 test/fields/push_type/date_field_test.rb
push_type_core-0.8.2 test/fields/push_type/date_field_test.rb