Remove unused asset host logic from GfmPipeline and EmojiFilter spec

This commit is contained in:
Douwe Maan 2018-06-29 11:21:13 +02:00
parent 50a213112e
commit ee2a9e0af0
No known key found for this signature in database
GPG key ID: 5976703F65143D36
2 changed files with 1 additions and 14 deletions

View file

@ -44,11 +44,7 @@ module Banzai
def self.transform_context(context)
context[:only_path] = true unless context.key?(:only_path)
context.merge(
# EmojiFilter
asset_host: Gitlab::Application.config.asset_host,
asset_root: Gitlab.config.gitlab.base_url
)
context
end
end
end

View file

@ -3,15 +3,6 @@ require 'spec_helper'
describe Banzai::Filter::EmojiFilter do
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
doc = filter('<p>:heart:</p>')
expect(doc.css('gl-emoji').first.text).to eq '❤'