Sha256: c5b434251ac204a72e49a194eafdd099458ba507f81625db5e3ec13142d4736c

Contents?: true

Size: 646 Bytes

Versions: 3

Compression:

Stored size: 646 Bytes

Contents

require 'test_helper'

class AttachmentFileTest < ActiveSupport::TestCase
  def teardown
    @attachment.destroy rescue nil
  end

  test "Set file content_type and size" do
    @attachment = create_attachment

    # TODO: fix filename parameterization
    if CKEDITOR_BACKEND == :paperclip
      assert_equal "rails_tar.gz", @attachment.data_file_name
    else
      assert_equal "rails.tar.gz", @attachment.data_file_name
    end

    assert_equal "application/x-gzip", @attachment.data_content_type
    assert_equal 6823, @attachment.data_file_size
    assert_equal "ckeditor/filebrowser/images/thumbs/gz.gif", @attachment.url_thumb
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ckeditor-4.1.3 test/models/attachment_file_test.rb
ckeditor-4.1.2 test/models/attachment_file_test.rb
ckeditor-4.1.1 test/models/attachment_file_test.rb