remove trailing white-spaces from test/functional/issue_statuses_controller_test.rb.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6932 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2011-08-31 23:02:00 +00:00
parent e103d11178
commit 32c2cf80e3
1 changed files with 11 additions and 11 deletions

View File

@ -7,7 +7,7 @@ class IssueStatusesController; def rescue_action(e) raise e end; end
class IssueStatusesControllerTest < ActionController::TestCase
fixtures :issue_statuses, :issues
def setup
@controller = IssueStatusesController.new
@request = ActionController::TestRequest.new
@ -15,19 +15,19 @@ class IssueStatusesControllerTest < ActionController::TestCase
User.current = nil
@request.session[:user_id] = 1 # admin
end
def test_index
get :index
assert_response :success
assert_template 'index'
end
def test_new
get :new
assert_response :success
assert_template 'new'
end
def test_create
assert_difference 'IssueStatus.count' do
post :create, :issue_status => {:name => 'New status'}
@ -36,33 +36,33 @@ class IssueStatusesControllerTest < ActionController::TestCase
status = IssueStatus.find(:first, :order => 'id DESC')
assert_equal 'New status', status.name
end
def test_edit
get :edit, :id => '3'
assert_response :success
assert_template 'edit'
end
def test_update
post :update, :id => '3', :issue_status => {:name => 'Renamed status'}
assert_redirected_to :action => 'index'
status = IssueStatus.find(3)
assert_equal 'Renamed status', status.name
end
def test_destroy
Issue.delete_all("status_id = 1")
assert_difference 'IssueStatus.count', -1 do
post :destroy, :id => '1'
end
assert_redirected_to :action => 'index'
assert_nil IssueStatus.find_by_id(1)
end
def test_destroy_should_block_if_status_in_use
assert_not_nil Issue.find_by_status_id(1)
assert_no_difference 'IssueStatus.count' do
post :destroy, :id => '1'
end
@ -91,5 +91,5 @@ class IssueStatusesControllerTest < ActionController::TestCase
should_redirect_to('the index') { '/issue_statuses' }
end
end
end