adds the max_attachment_size_kb setting

so that we can specify a different max upload size for attachments and images.
This commit is contained in:
Régis Hanol
2013-07-16 01:59:23 +02:00
parent e83cd9d111
commit 5ce05ff5cb
19 changed files with 115 additions and 83 deletions

View File

@ -17,7 +17,6 @@ describe UploadsController do
let(:logo) do
ActionDispatch::Http::UploadedFile.new({
filename: 'logo.png',
type: 'image/png',
tempfile: File.new("#{Rails.root}/spec/fixtures/images/logo.png")
})
end
@ -25,7 +24,6 @@ describe UploadsController do
let(:logo_dev) do
ActionDispatch::Http::UploadedFile.new({
filename: 'logo-dev.png',
type: 'image/png',
tempfile: File.new("#{Rails.root}/spec/fixtures/images/logo-dev.png")
})
end
@ -33,7 +31,6 @@ describe UploadsController do
let(:text_file) do
ActionDispatch::Http::UploadedFile.new({
filename: 'LICENSE.txt',
type: 'text/plain',
tempfile: File.new("#{Rails.root}/LICENSE.txt")
})
end
@ -42,11 +39,6 @@ describe UploadsController do
context 'with a file' do
it 'is successful' do
xhr :post, :create, file: logo
response.should be_success
end
context 'when authorized' do
before { SiteSetting.stubs(:authorized_extensions).returns(".txt") }