test/storage/filesystem_test.rb in paperclip-3.3.0 vs test/storage/filesystem_test.rb in paperclip-3.3.1

- old
+ new

@@ -39,9 +39,17 @@ paths = @dummy.avatar.queued_for_write.values.map(&:path) @dummy.save assert paths.none?{ |path| File.exists?(path) }, "Expect all the files to be deleted." end + + should 'copy the file to a known location with copy_to_local_file' do + tempfile = Tempfile.new("known_location") + @dummy.avatar.copy_to_local_file(:original, tempfile.path) + tempfile.rewind + assert_equal @file.read, tempfile.read + tempfile.close + end end context "with file that has space in file name" do setup do rebuild_model :styles => { :thumbnail => "25x25#" }