Sha256: 1f3705d458676a3a5238defaec88ff9f8b57ec8f6f692ab8d1192201173d7cf5

Contents?: true

Size: 489 Bytes

Versions: 32

Compression:

Stored size: 489 Bytes

Contents

require 'test_helper'

module PushType
  class StringFieldTest < ActiveSupport::TestCase

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

    let(:node)  { TestPage.create FactoryGirl.attributes_for(:node, foo: val) }
    let(:val)   { 'abc' }
    let(:field) { node.fields[:foo] }
    
    it { field.form_helper.must_equal :text_field }
    it { field.json_value.must_equal val }
    it { field.value.must_equal val }

    it { node.foo.must_equal val }

  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

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