From 4cef3cd762f5965aaf4d2e7328c54ed68c99aa28 Mon Sep 17 00:00:00 2001 From: Sam Saffron Date: Fri, 1 Sep 2017 13:12:47 -0400 Subject: [PATCH] move fix to top of test --- spec/jobs/pull_hotlinked_images_spec.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spec/jobs/pull_hotlinked_images_spec.rb b/spec/jobs/pull_hotlinked_images_spec.rb index 2b37f3a2b05..b9c6bb0ba5e 100644 --- a/spec/jobs/pull_hotlinked_images_spec.rb +++ b/spec/jobs/pull_hotlinked_images_spec.rb @@ -17,6 +17,7 @@ describe Jobs::PullHotlinkedImages do stub_request(:head, large_image_url) SiteSetting.download_remote_images_to_local = true SiteSetting.max_image_size_kb = 2 + SiteSetting.download_remote_images_threshold = 0 end describe '#execute' do @@ -82,12 +83,12 @@ describe Jobs::PullHotlinkedImages do end it 'replaces image src' do - SiteSetting.download_remote_images_threshold = 0 post = Fabricate(:post, raw: "#{url}") Jobs::ProcessPost.new.execute(post_id: post.id) Jobs::PullHotlinkedImages.new.execute(post_id: post.id) Jobs::ProcessPost.new.execute(post_id: post.id) + post.reload expect(post.cooked).to match(/