2019-10-12 21:52:04 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2022-10-11 01:57:18 +05:30
|
|
|
require 'fast_spec_helper'
|
2016-01-14 18:37:52 +05:30
|
|
|
|
2023-04-23 21:23:45 +05:30
|
|
|
RSpec.describe Banzai::Querying, feature_category: :team_planning do
|
2016-01-14 18:37:52 +05:30
|
|
|
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
|