Sha256: 39bbaaf9643ed88c85773c6ba47d542bb7ef4154ab633f287c15bec451b82a27
Contents?: true
Size: 493 Bytes
Versions: 139
Compression:
Stored size: 493 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.where_sql).to include(".\"deactivated_at\" IS NULL") end it "skips adding the deactivated_at where clause when unscoped" do expect(described_class.unscoped.where_sql.to_s).not_to include("\"deactivated_at\"") end end
Version data entries
139 entries across 139 versions & 1 rubygems