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

task_list_filter_spec.rb « filter « banzai « lib « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 569cbc885c76e68b9968eac4a98c148427cdae10 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
require 'spec_helper'

describe Banzai::Filter::TaskListFilter, lib: true do
  include FilterSpecHelper

  it 'does not apply `task-list` class to non-task lists' do
    exp = act = %(<ul><li>Item</li></ul>)
    expect(filter(act).to_html).to eq exp
  end

  it 'applies `task-list` to single-item task lists' do
    act = filter('<ul><li>[ ] Task 1</li></ul>')

    expect(act.to_html).to start_with '<ul class="task-list">'
  end
end