Sha256: 9ae9fd3f75550553993ce5b55522efecac9828956cd6ff8d73028453ae3fce40

Contents?: true

Size: 487 Bytes

Versions: 19

Compression:

Stored size: 487 Bytes

Contents

# frozen_string_literal: true

shared_examples_for "a Supersedable model" do
  it { is_expected.to have_db_column(:deactivated_at) }
  it { is_expected.to have_db_index(:deactivated_at) }

  it "adds a deactivated_at where clause" do
    expect(described_class.all.to_sql).to include(".\"deactivated_at\" IS NULL")
  end

  it "skips adding the deactivated_at where clause when unscoped" do
    expect(described_class.unscoped.to_sql.to_s).not_to include("\"deactivated_at\"")
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
renalware-core-2.1.1 spec/support/shared_examples/supersedable_examples.rb
renalware-core-2.1.0 spec/support/shared_examples/supersedable_examples.rb
renalware-core-2.0.167 spec/support/shared_examples/supersedable_examples.rb
renalware-core-2.0.166 spec/support/shared_examples/supersedable_examples.rb
renalware-core-2.0.165 spec/support/shared_examples/supersedable_examples.rb
renalware-core-2.0.164 spec/support/shared_examples/supersedable_examples.rb
renalware-core-2.0.163 spec/support/shared_examples/supersedable_examples.rb
renalware-core-2.0.162 spec/support/shared_examples/supersedable_examples.rb
renalware-core-2.0.161 spec/support/shared_examples/supersedable_examples.rb
renalware-core-2.0.160 spec/support/shared_examples/supersedable_examples.rb
renalware-core-2.0.159 spec/support/shared_examples/supersedable_examples.rb
renalware-core-2.0.158 spec/support/shared_examples/supersedable_examples.rb
renalware-core-2.0.157 spec/support/shared_examples/supersedable_examples.rb
renalware-core-2.0.156 spec/support/shared_examples/supersedable_examples.rb
renalware-core-2.0.155 spec/support/shared_examples/supersedable_examples.rb
renalware-core-2.0.153 spec/support/shared_examples/supersedable_examples.rb
renalware-core-2.0.152 spec/support/shared_examples/supersedable_examples.rb
renalware-core-2.0.151 spec/support/shared_examples/supersedable_examples.rb
renalware-core-2.0.149 spec/support/shared_examples/supersedable_examples.rb