end
def show_error_not_found
- render_error l(:error_scm_not_found)
+ render_error :message => l(:error_scm_not_found), :status => 404
end
# Handler for Redmine::Scm::Adapters::CommandFailed exception
@repository.reload
['', ' ', nil].each do |r|
get :revision, :id => 1, :rev => r
- assert_response 500
+ assert_response 404
assert_error_tag :content => /was not found/
end
end
@repository.reload
['', ' ', nil].each do |r|
get :revision, :id => 1, :rev => r
- assert_response 500
+ assert_response 404
assert_error_tag :content => /was not found/
end
end
def test_invalid_revision
get :revision, :id => 1, :rev => 'something_weird'
- assert_response 500
+ assert_response 404
assert_error_tag :content => /was not found/
end
def test_empty_revision
['', ' ', nil].each do |r|
get :revision, :id => 1, :rev => r
- assert_response 500
+ assert_response 404
assert_error_tag :content => /was not found/
end
end