diff --git a/spec/jobs/pull_hotlinked_images_spec.rb b/spec/jobs/pull_hotlinked_images_spec.rb index f9f50766785..aa9473a4783 100644 --- a/spec/jobs/pull_hotlinked_images_spec.rb +++ b/spec/jobs/pull_hotlinked_images_spec.rb @@ -3,9 +3,11 @@ require 'jobs/regular/pull_hotlinked_images' describe Jobs::PullHotlinkedImages do - png = Base64.decode64("R0lGODlhAQABALMAAAAAAIAAAACAAICAAAAAgIAAgACAgMDAwICAgP8AAAD/AP//AAAA//8A/wD//wBiZCH5BAEAAA8ALAAAAAABAAEAAAQC8EUAOw==") - FakeWeb.register_uri(:get, "http://wiki.mozilla.org/images/2/2e/Longcat1.png", body: png) - SiteSetting.download_remote_images_to_local = true + before do + png = Base64.decode64("R0lGODlhAQABALMAAAAAAIAAAACAAICAAAAAgIAAgACAgMDAwICAgP8AAAD/AP//AAAA//8A/wD//wBiZCH5BAEAAA8ALAAAAAABAAEAAAQC8EUAOw==") + FakeWeb.register_uri(:get, "http://wiki.mozilla.org/images/2/2e/Longcat1.png", body: png) + SiteSetting.download_remote_images_to_local = true + end it 'replaces image src' do post = Fabricate(:post, raw: "") diff --git a/spec/models/topic_spec.rb b/spec/models/topic_spec.rb index bcf49caceb9..b0db2dc92cd 100644 --- a/spec/models/topic_spec.rb +++ b/spec/models/topic_spec.rb @@ -37,7 +37,7 @@ describe Topic do expect(topic).to_not be_valid expect(topic.errors.full_messages.first).to include(I18n.t( - 'errors.messages.matches_censored_pattern', censored_words: 'orange monkey orange stuff' + 'errors.messages.matches_censored_pattern', censored_words: 'orangejuice orange monkey orange stuff' )) end end