Kill trailing whitespace in ruby files
This commit is contained in:
@@ -9,32 +9,32 @@ class BansControllerTest < ActionController::TestCase
|
||||
@user = FactoryGirl.create(:user)
|
||||
@ban = FactoryGirl.create(:ban, :user_id => @user.id)
|
||||
end
|
||||
|
||||
|
||||
teardown do
|
||||
CurrentUser.user = nil
|
||||
CurrentUser.ip_addr = nil
|
||||
end
|
||||
|
||||
|
||||
should "get the new page" do
|
||||
get :new, {}, {:user_id => @mod.id}
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
|
||||
should "get the edit page" do
|
||||
get :edit, {:id => @ban.id}, {:user_id => @mod.id}
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
|
||||
should "get the show page" do
|
||||
get :show, {:id => @ban.id}
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
|
||||
should "get the index page" do
|
||||
get :index
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
|
||||
should "create a ban" do
|
||||
assert_difference("Ban.count", 1) do
|
||||
post :create, {:ban => {:duration => 60, :reason => "xxx", :user_id => @user.id}}, {:user_id => @mod.id}
|
||||
@@ -42,14 +42,14 @@ class BansControllerTest < ActionController::TestCase
|
||||
ban = Ban.last
|
||||
assert_redirected_to(ban_path(ban))
|
||||
end
|
||||
|
||||
|
||||
should "update a ban" do
|
||||
post :update, {:id => @ban.id, :ban => {:reason => "xxx", :duration => 60}}, {:user_id => @mod.id}
|
||||
@ban.reload
|
||||
assert_equal("xxx", @ban.reason)
|
||||
assert_redirected_to(ban_path(@ban))
|
||||
end
|
||||
|
||||
|
||||
should "destroy a ban" do
|
||||
assert_difference("Ban.count", -1) do
|
||||
post :destroy, {:id => @ban.id}, {:user_id => @mod.id}
|
||||
|
||||
Reference in New Issue
Block a user