Sha256: 565862b48b3e48c231493b866616cf5c6bb34fadb222672d211e2d54a7a8f417

Contents?: true

Size: 483 Bytes

Versions: 3

Compression:

Stored size: 483 Bytes

Contents

require 'test_helper'

module PushType
  class TextFieldTest < ActiveSupport::TestCase

    class TestPage < PushType::Node
      field :foo, :text
    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_area }
    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/text_field_test.rb
push_type_core-0.12.0 test/fields/push_type/text_field_test.rb
push_type_core-0.12.0.beta.1 test/fields/push_type/text_field_test.rb