mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 22:43:33 +08:00
fix build
This commit is contained in:
@ -51,13 +51,12 @@ test("ensures an authorized upload", function() {
|
|||||||
|
|
||||||
test("prevents files that are too big from being uploaded", function() {
|
test("prevents files that are too big from being uploaded", function() {
|
||||||
Discourse.User.resetCurrent(Discourse.User.create());
|
Discourse.User.resetCurrent(Discourse.User.create());
|
||||||
var image = { name: "image.png", size: 10 * 1024 };
|
var image = { name: "image.png", size: 11 * 1024 * 1024 };
|
||||||
Discourse.SiteSettings.max_image_size_kb = 5;
|
|
||||||
Discourse.User.currentProp("trust_level", 1);
|
Discourse.User.currentProp("trust_level", 1);
|
||||||
sandbox.stub(bootbox, "alert");
|
sandbox.stub(bootbox, "alert");
|
||||||
|
|
||||||
not(validUpload([image]));
|
not(validUpload([image]));
|
||||||
ok(bootbox.alert.calledWith(I18n.t('post.errors.file_too_large', { max_size_kb: 5 })));
|
ok(bootbox.alert.calledWith(I18n.t('post.errors.file_too_large', { max_size_kb: 10 * 1024 })));
|
||||||
});
|
});
|
||||||
|
|
||||||
var imageSize = 10 * 1024;
|
var imageSize = 10 * 1024;
|
||||||
|
Reference in New Issue
Block a user