tests: drop timecop gem.

This commit is contained in:
evazion
2019-08-18 03:50:43 -05:00
parent b15fd6d017
commit 27a118dfc8
24 changed files with 38 additions and 42 deletions

View File

@@ -143,7 +143,7 @@ class CommentTest < ActiveSupport::TestCase
Danbooru.config.stubs(:comment_threshold).returns(1)
p = FactoryBot.create(:post)
c1 = FactoryBot.create(:comment, :post => p)
Timecop.travel(2.seconds.from_now) do
travel(2.seconds) do
c2 = FactoryBot.create(:comment, :post => p)
end
p.reload
@@ -158,7 +158,7 @@ class CommentTest < ActiveSupport::TestCase
post.reload
assert_equal(c1.created_at.to_s, post.last_commented_at.to_s)
Timecop.travel(2.seconds.from_now) do
travel(2.seconds) do
c2 = FactoryBot.create(:comment, :post => post)
post.reload
assert_equal(c2.created_at.to_s, post.last_commented_at.to_s)