spec/integration_spec.rb in paperclip-storage-ftp-1.2.5 vs spec/integration_spec.rb in paperclip-storage-ftp-1.2.6

- old
+ new

@@ -64,9 +64,20 @@ Dir.exist?(File.dirname(uploaded_file_server1)).should be false Dir.exist?(File.dirname(uploaded_file_server2)).should be false end + it "does not remove empty parent directories if disabled" do + user = UserDisablingEmptyDirectoryRemoval.new + user.avatar = file + user.save! + + user.destroy + + Dir.exist?(File.dirname(uploaded_file_server1)).should be true + Dir.exist?(File.dirname(uploaded_file_server2)).should be true + end + it "does not remove parent directories which are not empty" do user.avatar = file user.save! FileUtils.touch(uploaded_file_server1_other)