2020-01-01 13:55:28 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
require 'spec_helper'
|
|
|
|
|
2023-04-23 21:23:45 +05:30
|
|
|
RSpec.describe Banzai::Pipeline::BroadcastMessagePipeline, feature_category: :team_planning do
|
2021-03-11 19:13:27 +05:30
|
|
|
let_it_be(:group) { create(:group) }
|
|
|
|
let_it_be(:project) { create(:project, group: group) }
|
|
|
|
|
2020-01-01 13:55:28 +05:30
|
|
|
before do
|
|
|
|
stub_commonmark_sourcepos_disabled
|
|
|
|
end
|
|
|
|
|
2021-03-11 19:13:27 +05:30
|
|
|
subject { described_class.to_html(exp, project: project) }
|
2020-01-01 13:55:28 +05:30
|
|
|
|
|
|
|
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
|