Sha256: 4666fb8ffb7404a92703fd0a406232ef263b20431948852b1f4e54f3f4cec5bd

Contents?: true

Size: 413 Bytes

Versions: 6

Compression:

Stored size: 413 Bytes

Contents

require File.dirname(__FILE__) + '/helper'

class DirtyTest < ActiveSupport::TestCase
  fixtures :blogs, :posts

  Post.has_cache_back
  Post.cache_back_dirty_methods :make_dirty!

  should "update the cache when a dirty method is called" do
    post = Post.first

    pots = Post.find(post.id)
    assert(Rails.cache.read(post.cache_back_key))

    CacheBack.cache.expects(:write)
    post.make_dirty!
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
cache_back-0.4.1 test/dirty_test.rb
cache_back-0.3.4 test/dirty_test.rb
cache_back-0.3.3 test/dirty_test.rb
cache_back-0.3.2 test/dirty_test.rb
cache_back-0.3.1 test/dirty_test.rb
cache_back-0.3.0 test/dirty_test.rb