Sha256: f6ab748e455319955a6122ee6365920cf77dd929830aa384ff5274e2c54974e6

Contents?: true

Size: 609 Bytes

Versions: 4

Compression:

Stored size: 609 Bytes

Contents

require 'test_helper'

class S3ImageUploadTest < ActiveSupport::TestCase

  setup do
    load_s3
    options = { presets: [:small, :big] }
    @image = Attachs::Types::Image.new(fixture_file_upload('/image.jpg', 'image/jpeg'), options)
    @image.store
  end

  test "should save/destory main image and thumbs" do
    original = @image.url
    big = @image.url(:big)
    small = @image.url(:small)

    assert_object_s3 original
    assert_object_s3 big
    assert_object_s3 small

    @image.delete
   
    assert_not_object_s3 original
    assert_not_object_s3 big
    assert_not_object_s3 small
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
attachs-0.3.5 test/s3_image_upload_tes.rb
attachs-0.3.2 test/s3_image_upload_tes.rb
attachs-0.3.1 test/s3_image_upload_tes.rb
attachs-0.3.0 test/s3_image_upload_tes.rb