mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 06:41:25 +08:00
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:
@ -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") }
|
||||
|
Reference in New Issue
Block a user