-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
4325 - Carrierwave deprecated 'extension_white_list' #4326
Conversation
@@ -0,0 +1,5 @@ | |||
FactoryBot.define do | |||
factory :document_upload do | |||
file { Rack::Test::UploadedFile.new(File.open(File.join(Rails.root, 'test_data/uploads/test.pdf'))) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will allow us to create document_upload factory easier
expect(subject).not_to be_valid | ||
expect(subject.errors.messages[:file]).to include( | ||
"can't be blank", | ||
'You are not allowed to upload "txt" files, allowed types: zip, pdf' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This spec should catch (if by any chance carrierwave change their methods again) and validates that the file whitelisting works
bcda596
to
d08ff3f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks really good.
No description provided.