summaryrefslogtreecommitdiff
path: root/spec/lib/banzai/querying_spec.rb
blob: b7a235b055851cf206775c2b444fd961fdacc85a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# frozen_string_literal: true

require 'spec_helper'

describe Banzai::Querying do
  describe '.css' do
    it 'optimizes queries for elements with classes' do
      document = double(:document)

      expect(document).to receive(:xpath).with(/^descendant::a/)

      described_class.css(document, 'a.gfm')
    end
  end
end