fix forum post test

This commit is contained in:
r888888888
2015-07-15 14:56:56 -07:00
parent 71347ae5f0
commit 3f3c86c49b
2 changed files with 5 additions and 1 deletions

View File

@@ -36,7 +36,7 @@ class Cache
value = MEMCACHE.get key
elapsed = Time.now - start_time
if expiry_in_seconds
expiry = expiry_in_seconds.seconds.from_now.to_i if expiry_in_seconds
expiry = expiry_in_seconds.seconds.from_now.to_i
else
expiry = 0
end

View File

@@ -27,6 +27,10 @@ class ForumPostTest < ActiveSupport::TestCase
end
context "that is deleted" do
setup do
CurrentUser.user = FactoryGirl.create(:moderator_user)
end
should "update the topic's updated_at timestamp" do
@topic.reload
assert_equal(@posts[-1].updated_at.to_i, @topic.updated_at.to_i)