Sha256: 5b6b0f790d246fe41cd156cef19f97de6c38e052bce3a8cc04667079f4ba4b5e
Contents?: true
Size: 525 Bytes
Versions: 110
Compression:
Stored size: 525 Bytes
Contents
# frozen_string_literal: true # From https://github.com/rubysherpas/paranoia/wiki/Testing-with-rspec shared_examples_for "a Paranoid model" do it { is_expected.to have_db_column(:deleted_at) } it { is_expected.to have_db_index(:deleted_at) } it "adds a deleted_at where clause" do expect(described_class.all.to_sql).to include(".\"deleted_at\" IS NULL") end it "skips adding the deleted_at where clause when unscoped" do expect(described_class.unscoped.to_sql).not_to include("\"deleted_at\"") end end
Version data entries
110 entries across 110 versions & 1 rubygems