fixes #804
This commit is contained in:
@@ -80,7 +80,7 @@ class CommentTest < ActiveSupport::TestCase
|
||||
comment_vote = c1.vote!("up")
|
||||
assert_equal([], comment_vote.errors.full_messages)
|
||||
comment_vote = c1.vote!("up")
|
||||
assert_equal(["User has already voted for this comment"], comment_vote.errors.full_messages)
|
||||
assert_equal(["You have already voted for this comment"], comment_vote.errors.full_messages)
|
||||
assert_equal(1, CommentVote.count)
|
||||
assert_equal(1, CommentVote.last.score)
|
||||
|
||||
|
||||
@@ -373,6 +373,12 @@ class PostTest < ActiveSupport::TestCase
|
||||
should "update the category cache of the tag" do
|
||||
assert_equal(Tag.categories.copyright, Cache.get("tc:abc"))
|
||||
end
|
||||
|
||||
should "update the tag counts of the posts" do
|
||||
assert_equal(0, @post.tag_count_artist)
|
||||
assert_equal(1, @post.tag_count_copyright)
|
||||
assert_equal(0, @post.tag_count_general)
|
||||
end
|
||||
end
|
||||
|
||||
context "tagged with a metatag" do
|
||||
|
||||
Reference in New Issue
Block a user