Sha256: 594c6e05190b35ca169a27b1210b765c0ccc054fd9d752f541e6747015f2ace4

Contents?: true

Size: 621 Bytes

Versions: 25

Compression:

Stored size: 621 Bytes

Contents

require 'test_helper'

module PushType
  class WysiwygFieldTest < ActiveSupport::TestCase

    class TestPage < PushType::Node
      field :foo, :wysiwyg, toolbar: 'text'
    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_area }
    it { field.toolbar.must_equal 'text' }
    it { field.html_options[:'froala-toolbar'].must_equal 'text' }
    it { field.json_value.must_equal val }
    it { field.value.must_equal val }

    it { node.foo.must_equal val }
    
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

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