revert e7b3fae215
This commit is contained in:
@@ -48,13 +48,13 @@ class PostFlagTest < ActiveSupport::TestCase
|
||||
assert_equal(["You have already flagged this post"], @post_flag.errors.full_messages)
|
||||
end
|
||||
|
||||
should "not be able to flag more than 5 posts in 24 hours" do
|
||||
should "not be able to flag more than 10 posts in 24 hours" do
|
||||
@post_flag = PostFlag.new(:post => @post, :reason => "aaa", :is_resolved => false)
|
||||
@post_flag.expects(:flag_count_for_creator).returns(5)
|
||||
@post_flag.expects(:flag_count_for_creator).returns(10)
|
||||
assert_difference("PostFlag.count", 0) do
|
||||
@post_flag.save
|
||||
end
|
||||
assert_equal(["You can flag 5 posts a day"], @post_flag.errors.full_messages)
|
||||
assert_equal(["You can flag 10 posts a day"], @post_flag.errors.full_messages)
|
||||
end
|
||||
|
||||
should "not be able to flag a deleted post" do
|
||||
|
||||
Reference in New Issue
Block a user