Kill trailing whitespace in ruby files
This commit is contained in:
@@ -14,24 +14,24 @@ class PostAppealTest < ActiveSupport::TestCase
|
||||
CurrentUser.user = nil
|
||||
CurrentUser.ip_addr = nil
|
||||
end
|
||||
|
||||
|
||||
context "a user" do
|
||||
setup do
|
||||
@post = FactoryGirl.create(:post, :tag_string => "aaa", :is_deleted => true)
|
||||
end
|
||||
|
||||
|
||||
should "not be able to appeal a post more than twice" do
|
||||
assert_difference("PostAppeal.count", 1) do
|
||||
@post_appeal = PostAppeal.create(:post => @post, :reason => "aaa")
|
||||
end
|
||||
|
||||
|
||||
assert_difference("PostAppeal.count", 0) do
|
||||
@post_appeal = PostAppeal.create(:post => @post, :reason => "aaa")
|
||||
end
|
||||
|
||||
|
||||
assert_equal(["You have already appealed this post"], @post_appeal.errors.full_messages)
|
||||
end
|
||||
|
||||
|
||||
should "not be able to appeal more than 5 posts in 24 hours" do
|
||||
@post_appeal = PostAppeal.new(:post => @post, :reason => "aaa")
|
||||
@post_appeal.expects(:appeal_count_for_creator).returns(5)
|
||||
@@ -40,7 +40,7 @@ class PostAppealTest < ActiveSupport::TestCase
|
||||
end
|
||||
assert_equal(["You can appeal at most 5 post a day"], @post_appeal.errors.full_messages)
|
||||
end
|
||||
|
||||
|
||||
should "not be able to appeal an active post" do
|
||||
@post.update_attribute(:is_deleted, false)
|
||||
assert_difference("PostAppeal.count", 0) do
|
||||
@@ -48,7 +48,7 @@ class PostAppealTest < ActiveSupport::TestCase
|
||||
end
|
||||
assert_equal(["Post is active"], @post_appeal.errors.full_messages)
|
||||
end
|
||||
|
||||
|
||||
should "initialize its creator" do
|
||||
@post_appeal = PostAppeal.create(:post => @post, :reason => "aaa")
|
||||
assert_equal(@alice.id, @post_appeal.creator_id)
|
||||
|
||||
Reference in New Issue
Block a user