mirror of
https://github.com/redmine/redmine.git
synced 2025-11-13 16:56:00 +01:00
git-svn-id: https://svn.redmine.org/redmine/trunk@22493 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -2188,24 +2188,24 @@ class ApplicationHelperTest < Redmine::HelperTest
|
|||||||
|
|
||||||
# TODO: Remove this test when ApplicationHelper#render_if_exist is removed
|
# TODO: Remove this test when ApplicationHelper#render_if_exist is removed
|
||||||
def test_render_if_exist_should_be_render_partial
|
def test_render_if_exist_should_be_render_partial
|
||||||
saved_behavior = ActiveSupport::Deprecation.behavior
|
saved_behavior = Rails.application.deprecators[:active_support].behavior
|
||||||
ActiveSupport::Deprecation.behavior = :silence
|
Rails.application.deprecators[:active_support].behavior = :silence
|
||||||
|
|
||||||
controller.prepend_view_path "test/fixtures/views"
|
controller.prepend_view_path "test/fixtures/views"
|
||||||
assert_equal "partial html\n", render_if_exist(:partial => 'partial')
|
assert_equal "partial html\n", render_if_exist(:partial => 'partial')
|
||||||
ensure
|
ensure
|
||||||
ActiveSupport::Deprecation.behavior = saved_behavior
|
Rails.application.deprecators[:active_support].behavior = saved_behavior
|
||||||
end
|
end
|
||||||
|
|
||||||
# TODO: Remove this test when ApplicationHelper#render_if_exist is removed
|
# TODO: Remove this test when ApplicationHelper#render_if_exist is removed
|
||||||
def test_render_if_exist_should_be_render_nil
|
def test_render_if_exist_should_be_render_nil
|
||||||
saved_behavior = ActiveSupport::Deprecation.behavior
|
saved_behavior = Rails.application.deprecators[:active_support].behavior
|
||||||
ActiveSupport::Deprecation.behavior = :silence
|
Rails.application.deprecators[:active_support].behavior = :silence
|
||||||
|
|
||||||
controller.prepend_view_path "test/fixtures/views"
|
controller.prepend_view_path "test/fixtures/views"
|
||||||
assert_nil render_if_exist(:partial => 'non_exist_partial')
|
assert_nil render_if_exist(:partial => 'non_exist_partial')
|
||||||
ensure
|
ensure
|
||||||
ActiveSupport::Deprecation.behavior = saved_behavior
|
Rails.application.deprecators[:active_support].behavior = saved_behavior
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_export_csv_encoding_select_tag_should_return_nil_when_general_csv_encoding_is_UTF8
|
def test_export_csv_encoding_select_tag_should_return_nil_when_general_csv_encoding_is_UTF8
|
||||||
|
|||||||
Reference in New Issue
Block a user