A platform for community discussion. Free, open, simple.
DEV: Fix CookedPostProcessor specs
Jarek Radosz067c4a7c10d7
diff --git a/spec/components/cooked_post_processor_spec.rb b/spec/components/cooked_post_processor_spec.rbindex eec42c7c2b1..70fa66e5a78 100644--- a/spec/components/cooked_post_processor_spec.rb+++ b/spec/components/cooked_post_processor_spec.rb@@ -1437,18 +1437,18 @@ describe CookedPostProcessor dobefore doSiteSetting.download_remote_images_to_local = true- cpp.expects(:available_disk_space).returns(50)+ SiteSetting.download_remote_images_threshold = 20+ cpp.stubs(:available_disk_space).returns(50)endit "does nothing when there's enough disk space" do- SiteSetting.expects(:download_remote_images_threshold).returns(20)SiteSetting.expects(:download_remote_images_to_local=).neverexpect(cpp.disable_if_low_on_disk_space).to eq(false)endcontext "when there's not enough disk space" do- before { SiteSetting.expects(:download_remote_images_threshold).returns(75) }+ before { SiteSetting.download_remote_images_threshold = 75 }it "disables download_remote_images_threshold and send a notification to the admin" doStaffActionLogger.any_instance.expects(:log_site_setting_change).once