Return document max file size in megabytes
The same way it's done for images. We were converting the number of megabytes to bytes and then converting it to megabytes again. Instead, we can leave it as it is and only convert it to bytes when necessary (only one place).
This commit is contained in:
@@ -2,7 +2,7 @@ shared_examples "document validations" do |documentable_factory|
|
||||
include DocumentablesHelper
|
||||
|
||||
let!(:document) { build(:document, documentable_factory.to_sym) }
|
||||
let!(:maxfilesize) { max_file_size(document.documentable.class) }
|
||||
let!(:maxfilesize) { document.documentable.class.max_file_size }
|
||||
let!(:acceptedcontenttypes) { accepted_content_types(document.documentable.class) }
|
||||
|
||||
it "is valid" do
|
||||
|
||||
Reference in New Issue
Block a user