fix forum post test
This commit is contained in:
@@ -36,7 +36,7 @@ class Cache
|
|||||||
value = MEMCACHE.get key
|
value = MEMCACHE.get key
|
||||||
elapsed = Time.now - start_time
|
elapsed = Time.now - start_time
|
||||||
if expiry_in_seconds
|
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
|
else
|
||||||
expiry = 0
|
expiry = 0
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -27,6 +27,10 @@ class ForumPostTest < ActiveSupport::TestCase
|
|||||||
end
|
end
|
||||||
|
|
||||||
context "that is deleted" do
|
context "that is deleted" do
|
||||||
|
setup do
|
||||||
|
CurrentUser.user = FactoryGirl.create(:moderator_user)
|
||||||
|
end
|
||||||
|
|
||||||
should "update the topic's updated_at timestamp" do
|
should "update the topic's updated_at timestamp" do
|
||||||
@topic.reload
|
@topic.reload
|
||||||
assert_equal(@posts[-1].updated_at.to_i, @topic.updated_at.to_i)
|
assert_equal(@posts[-1].updated_at.to_i, @topic.updated_at.to_i)
|
||||||
|
|||||||
Reference in New Issue
Block a user