Sha256: 90ea9d26b3015eb5cf729369f38db95de1ad8f95250f3cfba850eafa081b41f9

Contents?: true

Size: 519 Bytes

Versions: 27

Compression:

Stored size: 519 Bytes

Contents

require 'test_helper'

module PushType
  class BooleanFieldTest < ActiveSupport::TestCase

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

    let(:node)  { TestPage.create FactoryGirl.attributes_for(:node, foo: '1') }
    let(:field) { node.fields[:foo] }
    
    it { field.json_primitive.must_equal :boolean }
    it { field.form_helper.must_equal :check_box }
    it { field.json_value.must_equal true }
    it { field.value.must_equal true }

    it { node.foo.must_equal true }

  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

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