mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-09 17:15:18 +00:00
Skip paperclip spoof detector unless opted into attachment processing specs (#31454)
This commit is contained in:
parent
69dbc23038
commit
19849eb91d
|
@ -147,7 +147,10 @@ RSpec.configure do |config|
|
||||||
|
|
||||||
config.before do |example|
|
config.before do |example|
|
||||||
unless example.metadata[:attachment_processing]
|
unless example.metadata[:attachment_processing]
|
||||||
allow_any_instance_of(Paperclip::Attachment).to receive(:post_process).and_return(true) # rubocop:disable RSpec/AnyInstance
|
# rubocop:disable RSpec/AnyInstance
|
||||||
|
allow_any_instance_of(Paperclip::Attachment).to receive(:post_process).and_return(true)
|
||||||
|
allow_any_instance_of(Paperclip::MediaTypeSpoofDetector).to receive(:spoofed?).and_return(false)
|
||||||
|
# rubocop:enable RSpec/AnyInstance
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue