mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 14:31:03 +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:
@ -88,4 +88,26 @@ describe SiteSetting do
|
||||
end
|
||||
end
|
||||
|
||||
describe "authorized extensions" do
|
||||
|
||||
describe "authorized_uploads" do
|
||||
|
||||
it "trims space and adds leading dots" do
|
||||
SiteSetting.stubs(:authorized_extensions).returns(" png | .jpeg|txt|bmp")
|
||||
SiteSetting.authorized_uploads.should == [".png", ".jpeg", ".txt", ".bmp"]
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
describe "authorized_images" do
|
||||
|
||||
it "filters non-image out" do
|
||||
SiteSetting.stubs(:authorized_extensions).returns(" png | .jpeg|txt|bmp")
|
||||
SiteSetting.authorized_images.should == [".png", ".jpeg", ".bmp"]
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
Reference in New Issue
Block a user