mirror of
https://github.com/discourse/discourse.git
synced 2025-02-08 04:18:23 +00:00
fix failing specs
This commit is contained in:
parent
c36dda70ae
commit
7ead3e1f18
@ -3,9 +3,11 @@ require 'jobs/regular/pull_hotlinked_images'
|
|||||||
|
|
||||||
describe Jobs::PullHotlinkedImages do
|
describe Jobs::PullHotlinkedImages do
|
||||||
|
|
||||||
png = Base64.decode64("R0lGODlhAQABALMAAAAAAIAAAACAAICAAAAAgIAAgACAgMDAwICAgP8AAAD/AP//AAAA//8A/wD//wBiZCH5BAEAAA8ALAAAAAABAAEAAAQC8EUAOw==")
|
before do
|
||||||
FakeWeb.register_uri(:get, "http://wiki.mozilla.org/images/2/2e/Longcat1.png", body: png)
|
png = Base64.decode64("R0lGODlhAQABALMAAAAAAIAAAACAAICAAAAAgIAAgACAgMDAwICAgP8AAAD/AP//AAAA//8A/wD//wBiZCH5BAEAAA8ALAAAAAABAAEAAAQC8EUAOw==")
|
||||||
SiteSetting.download_remote_images_to_local = true
|
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
|
it 'replaces image src' do
|
||||||
post = Fabricate(:post, raw: "<img src='http://wiki.mozilla.org/images/2/2e/Longcat1.png'>")
|
post = Fabricate(:post, raw: "<img src='http://wiki.mozilla.org/images/2/2e/Longcat1.png'>")
|
||||||
|
@ -37,7 +37,7 @@ describe Topic do
|
|||||||
expect(topic).to_not be_valid
|
expect(topic).to_not be_valid
|
||||||
|
|
||||||
expect(topic.errors.full_messages.first).to include(I18n.t(
|
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
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user