Sha256: a3cd29ec7f26dcc4cadbd3c053f4e4533525c05d66e37e1379629bc34c401f32
Contents?: true
Size: 675 Bytes
Versions: 6
Compression:
Stored size: 675 Bytes
Contents
require 'spec_helper' describe Slacken::Filters::SanitizeHeadline, dsl: true do describe '#valid?' do subject { described_class.new.valid?(component) } context 'when a code occurs in a header' do let(:component) do c(:h3, text('A Ruby Code is Given: '), c(:span, c(:code, text("puts('hello, world!')")))) end it { is_expected.to be_falsey } end context 'when only allowed tags occur in a header' do let(:component) do c(:h3, text('hoge'), c(:i, text('fuga')), c(:span, text('piyo'))) end it { is_expected.to be_truthy } end end end
Version data entries
6 entries across 6 versions & 1 rubygems