Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/diaspora/diaspora.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSarah Mei <sarahmei@gmail.com>2011-11-07 00:52:01 +0400
committerSarah Mei <sarahmei@gmail.com>2011-11-07 00:52:01 +0400
commitdb223b2a3fb6856c4a884c2a91a3bd8af87ff425 (patch)
tree4ae635909091f20cdd9aacf2367a8e375bfdfdaa
parent7200b0d9b3dc81b5057fd941aacb982ab1d5d178 (diff)
Rename and make pending the spec for populating the cache
-rw-r--r--spec/models/user/querying_spec.rb15
1 files changed, 2 insertions, 13 deletions
diff --git a/spec/models/user/querying_spec.rb b/spec/models/user/querying_spec.rb
index 94f60bcb1..d010570d3 100644
--- a/spec/models/user/querying_spec.rb
+++ b/spec/models/user/querying_spec.rb
@@ -98,26 +98,15 @@ describe User do
AppConfig[:redis_cache] = nil
end
- it "gets populated with latest 100 posts" do
- cache = mock(:cache_exists? => true, :supported_order? => true, :size => 0, :ensure_populated! => mock, :post_ids => [])
- RedisCache.stub(:new).and_return(cache)
- @opts = alice.send(:prep_opts, Post, @opts)
- cache.should_receive(:ensure_populated!).with(hash_including(@opts))
-
- alice.visible_shareable_ids(Post, @opts)
+ it "kicks off a job that will populate the latest 100 posts" do
+ pending "we need a job for this - ensure_populated! is too costly to do synchronously for new users"
end
it 'does not get used if if all_aspects? option is not present' do
RedisCache.should_not_receive(:new)
-
alice.visible_shareable_ids(Post, @opts.merge({:all_aspects? => false}))
end
- describe "#ensure_populated_cache" do
- it 'does nothing if the cache is already populated'
- it 're-populates the cache with the latest posts (in hashes)'
- end
-
describe '#use_cache?' do
before do
cache = mock(:cache_exists? => true, :supported_order? => true, :ensure_populated! => mock, :post_ids => [])