about summary refs log tree commit diff
path: root/spec/controllers/concerns
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2020-01-04 01:54:07 +0100
committermultiple creatures <dev@multiple-creature.party>2020-02-21 02:34:04 -0600
commite46051ca94690782ca24741a570f2051296cd2d5 (patch)
treef16b80b68fa0975e2acd73862bfdceed9a63c95d /spec/controllers/concerns
parent90f2752375145432747c559e0d44e0c86b2eef53 (diff)
port tootsuite#12748 to monsterfork: Fix base64-encoded file uploads not being possible
Fix #3804, Fix #5776
Diffstat (limited to 'spec/controllers/concerns')
-rw-r--r--spec/controllers/concerns/obfuscate_filename_spec.rb30
1 files changed, 0 insertions, 30 deletions
diff --git a/spec/controllers/concerns/obfuscate_filename_spec.rb b/spec/controllers/concerns/obfuscate_filename_spec.rb
deleted file mode 100644
index e06d53c03..000000000
--- a/spec/controllers/concerns/obfuscate_filename_spec.rb
+++ /dev/null
@@ -1,30 +0,0 @@
-# frozen_string_literal: true
-
-require 'rails_helper'
-
-describe ApplicationController, type: :controller do
-  controller do
-    include ObfuscateFilename
-
-    obfuscate_filename :file
-
-    def file
-      render plain: params[:file]&.original_filename
-    end
-  end
-
-  before do
-    routes.draw { get 'file' => 'anonymous#file' }
-  end
-
-  it 'obfusticates filename if the given parameter is specified' do
-    file = fixture_file_upload('files/imports.txt', 'text/plain')
-    post 'file', params: { file: file }
-    expect(response.body).to end_with '.txt'
-    expect(response.body).not_to include 'imports'
-  end
-
-  it 'does nothing if the given parameter is not specified' do
-    post 'file'
-  end
-end