@@ -656,16 +656,6 class IssuesControllerTest < ActionController::TestCase | |||||
656 | assert @response.body.blank? |
|
656 | assert @response.body.blank? | |
657 | end |
|
657 | end | |
658 |
|
658 | |||
659 | def test_index_should_rescue_invalid_sql_query |
|
|||
660 | Query.any_instance.stubs(:statement).returns("INVALID STATEMENT") |
|
|||
661 |
|
||||
662 | get :index |
|
|||
663 | assert_response 500 |
|
|||
664 | assert_tag 'p', :content => /An error occurred/ |
|
|||
665 | assert_nil session[:query] |
|
|||
666 | assert_nil session[:issues_index_sort] |
|
|||
667 | end |
|
|||
668 |
|
||||
669 | def test_show_by_anonymous |
|
659 | def test_show_by_anonymous | |
670 | get :show, :id => 1 |
|
660 | get :show, :id => 1 | |
671 | assert_response :success |
|
661 | assert_response :success |
@@ -77,4 +77,14 class IssuesControllerTransactionTest < ActionController::TestCase | |||||
77 | assert_tag :tag => 'div', :attributes => { :id => 'errorExplanation' }, |
|
77 | assert_tag :tag => 'div', :attributes => { :id => 'errorExplanation' }, | |
78 | :content => /Data has been updated by another user/ |
|
78 | :content => /Data has been updated by another user/ | |
79 | end |
|
79 | end | |
|
80 | ||||
|
81 | def test_index_should_rescue_invalid_sql_query | |||
|
82 | Query.any_instance.stubs(:statement).returns("INVALID STATEMENT") | |||
|
83 | ||||
|
84 | get :index | |||
|
85 | assert_response 500 | |||
|
86 | assert_tag 'p', :content => /An error occurred/ | |||
|
87 | assert_nil session[:query] | |||
|
88 | assert_nil session[:issues_index_sort] | |||
|
89 | end | |||
80 | end |
|
90 | end |
General Comments 0
You need to be logged in to leave comments.
Login now