diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2011-12-04 19:20:22 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2011-12-04 19:20:22 +0000 |
commit | 9f1c59e9d0db97282b3e508148e728cd1fb60392 (patch) | |
tree | c43d565669fbb794d3b5ca39e548f247f0f0eef2 /test/functional/issues_controller_transaction_test.rb | |
parent | 68149f8c73cf8a791f1d814916abf4b1e1aa47a5 (diff) | |
download | redmine-9f1c59e9d0db97282b3e508148e728cd1fb60392.tar.gz redmine-9f1c59e9d0db97282b3e508148e728cd1fb60392.zip |
Moves test to non-transactional fixtures tests (failure with postgresql).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8078 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/issues_controller_transaction_test.rb')
-rw-r--r-- | test/functional/issues_controller_transaction_test.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/functional/issues_controller_transaction_test.rb b/test/functional/issues_controller_transaction_test.rb index 3661cb5e6..3770dff0d 100644 --- a/test/functional/issues_controller_transaction_test.rb +++ b/test/functional/issues_controller_transaction_test.rb @@ -77,4 +77,14 @@ class IssuesControllerTransactionTest < ActionController::TestCase assert_tag :tag => 'div', :attributes => { :id => 'errorExplanation' }, :content => /Data has been updated by another user/ end + + def test_index_should_rescue_invalid_sql_query + Query.any_instance.stubs(:statement).returns("INVALID STATEMENT") + + get :index + assert_response 500 + assert_tag 'p', :content => /An error occurred/ + assert_nil session[:query] + assert_nil session[:issues_index_sort] + end end |