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: c89acd1a643d8e1a0e4324aadfa217dd2f24760d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
# frozen_string_literal: true

require 'spec_helper'

RSpec.describe Banzai::Filter::TaskListFilter do
  include FilterSpecHelper

  it 'adds `<task-button></task-button>` to every list item' do
    doc = filter("<ul data-sourcepos=\"1:1-2:20\">\n<li data-sourcepos=\"1:1-1:20\">[ ] testing item 1</li>\n<li data-sourcepos=\"2:1-2:20\">[x] testing item 2</li>\n</ul>")

    expect(doc.xpath('.//li//task-button').count).to eq(2)
  end
end