2019-12-16 13:08:22 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
require 'spec_helper'
|
|
|
|
|
2020-06-24 05:08:32 -04:00
|
|
|
RSpec.describe Banzai::Pipeline::BroadcastMessagePipeline do
|
2021-02-05 10:09:28 -05:00
|
|
|
let_it_be(:group) { create(:group) }
|
|
|
|
let_it_be(:project) { create(:project, group: group) }
|
|
|
|
|
2019-12-16 13:08:22 -05:00
|
|
|
before do
|
|
|
|
stub_commonmark_sourcepos_disabled
|
|
|
|
end
|
|
|
|
|
2021-02-05 10:09:28 -05:00
|
|
|
subject { described_class.to_html(exp, project: project) }
|
2019-12-16 13:08:22 -05:00
|
|
|
|
|
|
|
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
|