Sha256: aba241bdb4095da38657218fa28318eb8391e82cba0f5ad55fac25fd02ce6b51

Contents?: true

Size: 563 Bytes

Versions: 10

Compression:

Stored size: 563 Bytes

Contents

require 'test_helper'
 
class LocalGenerateTest < ActionDispatch::IntegrationTest

  setup do
    @image = RailsUploads::Types::Image.new(fixture_file_upload('/image.jpg', 'image/jpeg'))
    @image.store
  end

  teardown do
    @image.delete
  end

  test "should generate preset" do
    realpath = Rails.root.join('tmp', 'uploads', 'images', 'small', @image.filename)
    ::File.delete realpath

    path = ::File.join('', 'uploads', 'images', 'small', @image.filename)
    get path
    assert_redirected_to path

    assert ::File.exists?(realpath)
  end

end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
rails_uploads-0.2.9 test/integration/local_generate_test.rb
rails_uploads-0.2.8 test/integration/local_generate_test.rb
rails_uploads-0.2.7 test/integration/local_generate_test.rb
rails_uploads-0.2.6 test/integration/local_generate_test.rb
rails_uploads-0.2.5 test/integration/local_generate_test.rb
rails_uploads-0.2.4 test/integration/local_generate_test.rb
rails_uploads-0.2.3 test/integration/local_generate_test.rb
rails_uploads-0.2.2 test/integration/local_generate_test.rb
rails_uploads-0.2.1 test/integration/local_generate_test.rb
rails_uploads-0.2.0 test/integration/local_generate_test.rb