move fix to top of test
This commit is contained in:
parent
936582b8d1
commit
4cef3cd762
|
@ -17,6 +17,7 @@ describe Jobs::PullHotlinkedImages do
|
||||||
stub_request(:head, large_image_url)
|
stub_request(:head, large_image_url)
|
||||||
SiteSetting.download_remote_images_to_local = true
|
SiteSetting.download_remote_images_to_local = true
|
||||||
SiteSetting.max_image_size_kb = 2
|
SiteSetting.max_image_size_kb = 2
|
||||||
|
SiteSetting.download_remote_images_threshold = 0
|
||||||
end
|
end
|
||||||
|
|
||||||
describe '#execute' do
|
describe '#execute' do
|
||||||
|
@ -82,12 +83,12 @@ describe Jobs::PullHotlinkedImages do
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'replaces image src' do
|
it 'replaces image src' do
|
||||||
SiteSetting.download_remote_images_threshold = 0
|
|
||||||
post = Fabricate(:post, raw: "#{url}")
|
post = Fabricate(:post, raw: "#{url}")
|
||||||
|
|
||||||
Jobs::ProcessPost.new.execute(post_id: post.id)
|
Jobs::ProcessPost.new.execute(post_id: post.id)
|
||||||
Jobs::PullHotlinkedImages.new.execute(post_id: post.id)
|
Jobs::PullHotlinkedImages.new.execute(post_id: post.id)
|
||||||
Jobs::ProcessPost.new.execute(post_id: post.id)
|
Jobs::ProcessPost.new.execute(post_id: post.id)
|
||||||
|
|
||||||
post.reload
|
post.reload
|
||||||
|
|
||||||
expect(post.cooked).to match(/<img src=.*\/uploads/)
|
expect(post.cooked).to match(/<img src=.*\/uploads/)
|
||||||
|
|
Loading…
Reference in New Issue