debian-mirror-gitlab/spec/lib/banzai/pipeline/email_pipeline_spec.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

31 lines
837 B
Ruby
Raw Normal View History

2019-10-12 21:52:04 +05:30
# frozen_string_literal: true
2019-12-04 20:38:33 +05:30
require 'spec_helper'
2018-03-17 18:26:18 +05:30
2023-04-23 21:23:45 +05:30
RSpec.describe Banzai::Pipeline::EmailPipeline, feature_category: :team_planning do
2018-03-17 18:26:18 +05:30
describe '.filters' do
it 'returns the expected type' do
expect(described_class.filters).to be_kind_of(Banzai::FilterArray)
end
it 'excludes ImageLazyLoadFilter' do
expect(described_class.filters).not_to be_empty
expect(described_class.filters).not_to include(Banzai::Filter::ImageLazyLoadFilter)
end
2019-02-02 18:00:53 +05:30
it 'shows punycode for autolinks' do
examples = %W[
http://one😄two.com
http://\u0261itlab.com
]
examples.each do |markdown|
result = described_class.call(markdown, project: nil)[:output]
link = result.css('a').first
expect(link.content).to include('http://xn--')
end
end
2018-03-17 18:26:18 +05:30
end
end