@@ -1405,6 +1405,11 class IssuesControllerTest < ActionController::TestCase | |||||
1405 | assert @response.body.starts_with?('%PDF') |
|
1405 | assert @response.body.starts_with?('%PDF') | |
1406 | end |
|
1406 | end | |
1407 |
|
1407 | |||
|
1408 | def test_show_invalid_should_respond_with_404 | |||
|
1409 | get :show, :id => 999 | |||
|
1410 | assert_response 404 | |||
|
1411 | end | |||
|
1412 | ||||
1408 | def test_get_new |
|
1413 | def test_get_new | |
1409 | @request.session[:user_id] = 2 |
|
1414 | @request.session[:user_id] = 2 | |
1410 | get :new, :project_id => 1, :tracker_id => 1 |
|
1415 | get :new, :project_id => 1, :tracker_id => 1 | |
@@ -3813,6 +3818,14 class IssuesControllerTest < ActionController::TestCase | |||||
3813 | assert_response 302 |
|
3818 | assert_response 302 | |
3814 | end |
|
3819 | end | |
3815 |
|
3820 | |||
|
3821 | def test_destroy_invalid_should_respond_with_404 | |||
|
3822 | @request.session[:user_id] = 2 | |||
|
3823 | assert_no_difference 'Issue.count' do | |||
|
3824 | delete :destroy, :id => 999 | |||
|
3825 | end | |||
|
3826 | assert_response 404 | |||
|
3827 | end | |||
|
3828 | ||||
3816 | def test_default_search_scope |
|
3829 | def test_default_search_scope | |
3817 | get :index |
|
3830 | get :index | |
3818 | assert_tag :div, :attributes => {:id => 'quick-search'}, |
|
3831 | assert_tag :div, :attributes => {:id => 'quick-search'}, |
General Comments 0
You need to be logged in to leave comments.
Login now