Remove unused asset host logic from GfmPipeline and EmojiFilter spec
This commit is contained in:
parent
50a213112e
commit
ee2a9e0af0
|
@ -44,11 +44,7 @@ module Banzai
|
||||||
def self.transform_context(context)
|
def self.transform_context(context)
|
||||||
context[:only_path] = true unless context.key?(:only_path)
|
context[:only_path] = true unless context.key?(:only_path)
|
||||||
|
|
||||||
context.merge(
|
context
|
||||||
# EmojiFilter
|
|
||||||
asset_host: Gitlab::Application.config.asset_host,
|
|
||||||
asset_root: Gitlab.config.gitlab.base_url
|
|
||||||
)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -3,15 +3,6 @@ require 'spec_helper'
|
||||||
describe Banzai::Filter::EmojiFilter do
|
describe Banzai::Filter::EmojiFilter do
|
||||||
include FilterSpecHelper
|
include FilterSpecHelper
|
||||||
|
|
||||||
before do
|
|
||||||
@original_asset_host = ActionController::Base.asset_host
|
|
||||||
ActionController::Base.asset_host = 'https://foo.com'
|
|
||||||
end
|
|
||||||
|
|
||||||
after do
|
|
||||||
ActionController::Base.asset_host = @original_asset_host
|
|
||||||
end
|
|
||||||
|
|
||||||
it 'replaces supported name emoji' do
|
it 'replaces supported name emoji' do
|
||||||
doc = filter('<p>:heart:</p>')
|
doc = filter('<p>:heart:</p>')
|
||||||
expect(doc.css('gl-emoji').first.text).to eq '❤'
|
expect(doc.css('gl-emoji').first.text).to eq '❤'
|
||||||
|
|
Loading…
Reference in New Issue