Sfoglia il codice sorgente

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
tags/1.4.0
Jean-Philippe Lang 12 anni fa
parent
commit
9f1c59e9d0

+ 0
- 10
test/functional/issues_controller_test.rb Vedi File

@@ -656,16 +656,6 @@ class IssuesControllerTest < ActionController::TestCase
assert @response.body.blank?
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

def test_show_by_anonymous
get :show, :id => 1
assert_response :success

+ 10
- 0
test/functional/issues_controller_transaction_test.rb Vedi File

@@ -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

Loading…
Annulla
Salva