Sha256: 926f3bb2614229ebd7347e373d7af876e1153b64ba12c3bd06bfacb6bf9effa4

Contents?: true

Size: 695 Bytes

Versions: 45

Compression:

Stored size: 695 Bytes

Contents

require 'active_support/test_case'
require 'action_dispatch/testing/test_process'

class ActiveSupport::TestCase
  include ActionDispatch::TestProcess

  def new_attachment(data = nil)
    data ||= fixture_file_upload('files/rails.tar.gz', 'application/x-gzip')

    Ckeditor.attachment_file_model.new(:data => data)
  end

  def create_attachment(data = nil)
    attachment = new_attachment(data)
    attachment.save!
    attachment
  end

  def new_picture(data = nil)
    data ||= fixture_file_upload('files/rails.png', 'image/png')

    Ckeditor.picture_model.new(:data => data)
  end

  def create_picture(data = nil)
    picture = new_picture(data)
    picture.save!
    picture
  end
end

Version data entries

45 entries across 45 versions & 5 rubygems

Version Path
trusty-cms-7.0.9.1 vendor/bundle/ruby/3.3.0/gems/ckeditor-4.3.0/test/support/helpers.rb
danabr75-ckeditor-4.1.6 test/support/helpers.rb
glebtv-ckeditor-4.11.1 test/support/helpers.rb
ckeditor-4.3.0 test/support/helpers.rb
glebtv-ckeditor-4.7.3.1 test/support/helpers.rb
glebtv-ckeditor-4.7.3 test/support/helpers.rb
ckeditor-4.2.4 test/support/helpers.rb
ckeditor-4.2.3 test/support/helpers.rb
glebtv-ckeditor-4.6.0 test/support/helpers.rb
ckeditor-4.2.2 test/support/helpers.rb
ckeditor-4.2.1 test/support/helpers.rb
glebtv-ckeditor-4.5.10.3 test/support/helpers.rb
glebtv-ckeditor-4.5.10.2 test/support/helpers.rb
glebtv-ckeditor-4.5.10.1 test/support/helpers.rb
ckeditor-4.2.0 test/support/helpers.rb
glebtv-ckeditor-4.5.7.1 test/support/helpers.rb
glebtv-ckeditor-4.5.7 test/support/helpers.rb
ckeditor_custom_controller-4.1.6 test/support/helpers.rb
ckeditor-4.1.6 test/support/helpers.rb
ckeditor-4.1.5 test/support/helpers.rb