Sha256: 037eb8e53fa4750958259a8f3b7dd856249fdec046019e9702adc4ebd2eefe24
Contents?: true
Size: 908 Bytes
Versions: 4
Compression:
Stored size: 908 Bytes
Contents
require 'test_helper' class S3ImageStringTest < ActiveSupport::TestCase setup do load_s3 filename = 'image.jpg' fixture_file_upload_s3 "/#{filename}", 'image/jpeg', ::File.join('uploads', 'images', 'original', filename) fixture_file_upload_s3 "/#{filename}", 'image/jpeg', ::File.join('uploads', 'images', 'big', filename) fixture_file_upload_s3 "/#{filename}", 'image/jpeg', ::File.join('uploads', 'images', 'small', filename) options = { presets: [:small, :big] } @image = Attachs::Types::Image.new(filename, options) 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_string_tes.rb |
attachs-0.3.2 | test/s3_image_string_tes.rb |
attachs-0.3.1 | test/s3_image_string_tes.rb |
attachs-0.3.0 | test/s3_image_string_tes.rb |