Sha256: c6d1ebffcd690c181399ca33332b3c927da4b198a79fc297ff0c0d4c74f89f71

Contents?: true

Size: 484 Bytes

Versions: 4

Compression:

Stored size: 484 Bytes

Contents

# frozen_string_literal: true

require "test_helper"

class ParanoidTest < ActiveSupport::TestCase
  def setup
    skip unless defined?(Paranoi)
    @paranoid = Paranoid.create
  end

  def test_should_expire_cache_when_destroy
    skip unless defined(Paranoi)
    @paranoid.destroy
    assert_nil Paranoid.find_by(id: @paranoid.id)
    assert_nil SecondLevelCache.cache_store.read(@paranoid.second_level_cache_key)
    assert_nil User.read_second_level_cache(@paranoid.id)
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
second_level_cache-2.7.1 test/paranoid_test.rb
second_level_cache-2.7.0 test/paranoid_test.rb
second_level_cache-2.6.4 test/paranoid_test.rb
second_level_cache-2.6.3 test/paranoid_test.rb