diff options
author | ThibG <thib@sitedethib.com> | 2020-01-05 13:51:50 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-05 13:51:50 +0100 |
commit | bcfd6e3bb48f6e0eb88f7f3a650832842ab69166 (patch) | |
tree | 0e2bb7334c7954bee2962ed78565046e3b974725 /spec/controllers/concerns | |
parent | 22daf24600d8e99e4569740ee5836d25c70c1e8b (diff) | |
parent | 83359fef2b04e81b35b047510ddb0c79bcf8ddaa (diff) |
Merge pull request #1259 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'spec/controllers/concerns')
-rw-r--r-- | spec/controllers/concerns/obfuscate_filename_spec.rb | 30 |
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 |