Merge diffs from master

This commit is contained in:
Neil Lalonde 2019-01-31 17:52:14 -05:00
parent 448e960121
commit 7a079b286c
2 changed files with 0 additions and 17 deletions

View File

@ -267,11 +267,6 @@ class FinalDestination
return true if SiteSetting.whitelist_internal_hosts.split("|").any? { |h| h.downcase == @uri.hostname.downcase }
end
# Whitelisted hosts
return true if hostname_matches?(SiteSetting.s3_cdn_url) ||
hostname_matches?(GlobalSetting.try(:cdn_url)) ||
hostname_matches?(Discourse.base_url_no_prefix)
address_s = @opts[:lookup_ip].call(@uri.hostname)
return false unless address_s

View File

@ -138,18 +138,6 @@ describe DiscourseNarrativeBot::TrackSelector do
end
end
context 'when a non regular post is created' do
it 'should not do anything' do
moderator_post = Fabricate(:moderator_post, user: user, topic: topic)
expect do
described_class.new(
:reply, user, post_id: moderator_post.id
).select
end.to_not change { Post.count }
end
end
describe 'when user thank the bot' do
it 'should like the post' do
post.update!(raw: 'thanks!')