Sha256: 4f72a4e3387ef4df690803180e306bf531d47dd7d0887baf5cfb87d12c8e6175

Contents?: true

Size: 488 Bytes

Versions: 3

Compression:

Stored size: 488 Bytes

Contents

require 'test_helper'

module PushType
  class StringFieldTest < ActiveSupport::TestCase

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

    let(:node)  { TestPage.create FactoryBot.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

3 entries across 3 versions & 1 rubygems

Version Path
push_type_core-0.12.1 test/fields/push_type/string_field_test.rb
push_type_core-0.12.0 test/fields/push_type/string_field_test.rb
push_type_core-0.12.0.beta.1 test/fields/push_type/string_field_test.rb