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

intersect_spec.rb « gitlab « cop « rubocop « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: c81dae9af972243fecfd0ce89b3d681dbc1b3d43 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
# frozen_string_literal: true

require 'rubocop_spec_helper'
require_relative '../../../../rubocop/cop/gitlab/intersect'

RSpec.describe RuboCop::Cop::Gitlab::Intersect do
  it 'flags the use of Gitlab::SQL::Intersect.new' do
    expect_offense(<<~SOURCE)
    Gitlab::SQL::Intersect.new([foo])
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Use the `FromIntersect` concern, instead of using `Gitlab::SQL::Intersect` directly
    SOURCE
  end
end