Adds tests for when showing/deleting an invalid issue.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10937 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
4cc4e8bfd3
commit
46fe61d51e
|
@ -1405,6 +1405,11 @@ class IssuesControllerTest < ActionController::TestCase
|
|||
assert @response.body.starts_with?('%PDF')
|
||||
end
|
||||
|
||||
def test_show_invalid_should_respond_with_404
|
||||
get :show, :id => 999
|
||||
assert_response 404
|
||||
end
|
||||
|
||||
def test_get_new
|
||||
@request.session[:user_id] = 2
|
||||
get :new, :project_id => 1, :tracker_id => 1
|
||||
|
@ -3813,6 +3818,14 @@ class IssuesControllerTest < ActionController::TestCase
|
|||
assert_response 302
|
||||
end
|
||||
|
||||
def test_destroy_invalid_should_respond_with_404
|
||||
@request.session[:user_id] = 2
|
||||
assert_no_difference 'Issue.count' do
|
||||
delete :destroy, :id => 999
|
||||
end
|
||||
assert_response 404
|
||||
end
|
||||
|
||||
def test_default_search_scope
|
||||
get :index
|
||||
assert_tag :div, :attributes => {:id => 'quick-search'},
|
||||
|
|
Loading…
Reference in New Issue