Sha256: 8f086bdc57fecb94a8eb48b7b0bf35184f9f16764c0c8706114b8ee597a1a480

Contents?: true

Size: 360 Bytes

Versions: 1

Compression:

Stored size: 360 Bytes

Contents

# frozen_string_literal: true

RSpec.describe RuboCop::Cop::Sequel::PartialConstraint do
  subject(:cop) { described_class.new }

  it 'registers an offense when using where for constraint' do
    offenses = inspect_source(<<~RUBY)
      add_unique_constraint %i[col_1 col_2], where: "state != 'deleted'"
    RUBY

    expect(offenses.size).to eq(1)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rubocop-sequel-0.3.5 spec/rubocop/cop/sequel/partial_constraint_spec.rb