Welcome to mirror list, hosted at ThFree Co, Russian Federation.

broadcast_message_pipeline_spec.rb « pipeline « banzai « lib « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 41a91c56f3b020aa9bd3c3243d5cfb6829da0ffd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# frozen_string_literal: true

require 'spec_helper'

RSpec.describe Banzai::Pipeline::BroadcastMessagePipeline do
  before do
    stub_commonmark_sourcepos_disabled
  end

  subject { described_class.to_html(exp, project: spy) }

  context "allows `a` elements" do
    let(:exp) { "<a>Link</a>" }

    it { is_expected.to eq("<p>#{exp}</p>") }
  end

  context "allows `br` elements" do
    let(:exp) { "Hello<br>World" }

    it { is_expected.to eq("<p>#{exp}</p>") }
  end
end