Sha256: 792917239d96d204cbd312cefb801e23c8a5f85c1300dc534573d3d81a9df0e1

Contents?: true

Size: 539 Bytes

Versions: 22

Compression:

Stored size: 539 Bytes

Contents

require 'test_helper'

class PictureTest < ActiveSupport::TestCase
  def teardown
    @picture.destroy rescue nil
  end

  test "Set file content_type and size" do
    @picture = create_picture

    assert_equal "image/png", @picture.data_content_type
    assert_equal "rails.png", @picture.data_file_name
    assert_equal 6646, @picture.data_file_size
    assert @picture.url_thumb.include?('thumb_rails.png')

    if @picture.has_dimensions?
      assert_equal 50, @picture.width
      assert_equal 64, @picture.height
    end
  end
end

Version data entries

22 entries across 22 versions & 2 rubygems

Version Path
glebtv-ckeditor-4.4.7.4 test/models/picture_test.rb
glebtv-ckeditor-4.4.7.3 test/models/picture_test.rb
glebtv-ckeditor-4.4.7.2 test/models/picture_test.rb
glebtv-ckeditor-4.4.7.1 test/models/picture_test.rb
glebtv-ckeditor-4.4.7 test/models/picture_test.rb
glebtv-ckeditor-4.4.6 test/models/picture_test.rb
ckeditor-4.1.1 test/models/picture_test.rb
glebtv-ckeditor-4.4.3.4 test/models/picture_test.rb
glebtv-ckeditor-4.4.3.3 test/models/picture_test.rb
glebtv-ckeditor-4.4.3.2 test/models/picture_test.rb
glebtv-ckeditor-4.4.3.1 test/models/picture_test.rb
glebtv-ckeditor-4.4.3.0 test/models/picture_test.rb
glebtv-ckeditor-4.3.2.6 test/models/picture_test.rb
ckeditor-4.1.0 test/models/picture_test.rb
glebtv-ckeditor-4.3.2.5 test/models/picture_test.rb
ckeditor-4.0.11 test/models/picture_test.rb
glebtv-ckeditor-4.3.2.4 test/models/picture_test.rb
glebtv-ckeditor-4.3.2.3 test/models/picture_test.rb
glebtv-ckeditor-4.3.2.2 test/models/picture_test.rb
glebtv-ckeditor-4.3.2.1 test/models/picture_test.rb