aboutsummaryrefslogblamecommitdiffstats
path: root/activesupport/test/cache/behaviors/cache_delete_matched_behavior.rb
blob: ed8eba8fc2ddffea4a5552d88fe502032cb7a3bf (plain) (tree)
1
2
3
4
5
6
7
8
9
                             
 






                                  
                                   
                              
                                       


                                  
# frozen_string_literal: true

module CacheDeleteMatchedBehavior
  def test_delete_matched
    @cache.write("foo", "bar")
    @cache.write("fu", "baz")
    @cache.write("foo/bar", "baz")
    @cache.write("fu/baz", "bar")
    @cache.delete_matched(/oo/)
    assert_not @cache.exist?("foo")
    assert @cache.exist?("fu")
    assert_not @cache.exist?("foo/bar")
    assert @cache.exist?("fu/baz")
  end
end