Sha256: a8a9bce2b10d8b3e9d34061964565e9f5eea5c472117c260f12f72dba741762b
Contents?: true
Size: 788 Bytes
Versions: 2
Compression:
Stored size: 788 Bytes
Contents
# frozen_string_literal: true require 'active_support/test_case' require 'action_dispatch/testing/test_process' class ActiveSupport::TestCase include ActionDispatch::TestProcess def new_attachment(data = nil) data ||= Rack::Test::UploadedFile.new('test/dummy/test/fixtures/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 ||= Rack::Test::UploadedFile.new('test/dummy/test/fixtures/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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ckeditor-5.1.3 | test/support/helpers.rb |
ckeditor-5.1.2 | test/support/helpers.rb |