Use webmock instead of fakeweb for VCR; Fix tests; Use Timecop to speed up tests previously using sleep; Move artist rename into seperate operation

This commit is contained in:
r888888888
2013-05-24 12:59:13 -07:00
parent 9dfb8aa33e
commit 4dff618863
17 changed files with 4877 additions and 4760 deletions

View File

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