aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorRafael França <rafaelmfranca@gmail.com>2016-07-20 02:12:01 -0300
committerGitHub <noreply@github.com>2016-07-20 02:12:01 -0300
commit0e825917f1ee55379543b73bee5067e840334d6a (patch)
treeb5c48f0a7b1359839e5672703118ef045c8f1e10 /activesupport
parent9c6f348d7968dc544c29152f41bd5116449bf7ca (diff)
parent6b0792266b025e57f666b01cc206e78f31c01df4 (diff)
downloadrails-0e825917f1ee55379543b73bee5067e840334d6a.tar.gz
rails-0e825917f1ee55379543b73bee5067e840334d6a.tar.bz2
rails-0e825917f1ee55379543b73bee5067e840334d6a.zip
Merge pull request #25823 from mechanicles/missing-memory-store-tests
Add missing tests for memory store of cache.
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/test/caching_test.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/activesupport/test/caching_test.rb b/activesupport/test/caching_test.rb
index 1e3810f6f7..d4dec81b28 100644
--- a/activesupport/test/caching_test.rb
+++ b/activesupport/test/caching_test.rb
@@ -140,6 +140,16 @@ class CacheKeyTest < ActiveSupport::TestCase
end
class CacheStoreSettingTest < ActiveSupport::TestCase
+ def test_memory_store_gets_created_if_no_arguments_passed_to_lookup_store_method
+ store = ActiveSupport::Cache.lookup_store
+ assert_kind_of(ActiveSupport::Cache::MemoryStore, store)
+ end
+
+ def test_memory_store
+ store = ActiveSupport::Cache.lookup_store :memory_store
+ assert_kind_of(ActiveSupport::Cache::MemoryStore, store)
+ end
+
def test_file_fragment_cache_store
store = ActiveSupport::Cache.lookup_store :file_store, "/path/to/cache/directory"
assert_kind_of(ActiveSupport::Cache::FileStore, store)