From: Jean-Philippe Lang Date: Sat, 18 May 2013 20:29:40 +0000 (+0000) Subject: Include Redmine::I18n in helpers tests. X-Git-Tag: 2.4.0~331 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=bd8b509986fa7aeffae58fe92e1626f650000f8f;p=redmine.git Include Redmine::I18n in helpers tests. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11875 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/test/unit/helpers/activities_helper_test.rb b/test/unit/helpers/activities_helper_test.rb index e7785dde4..47c0b6c0b 100644 --- a/test/unit/helpers/activities_helper_test.rb +++ b/test/unit/helpers/activities_helper_test.rb @@ -19,6 +19,7 @@ require File.expand_path('../../../test_helper', __FILE__) class ActivitiesHelperTest < ActionView::TestCase include ActivitiesHelper + include Redmine::I18n class MockEvent attr_reader :event_datetime, :event_group, :name diff --git a/test/unit/helpers/application_helper_test.rb b/test/unit/helpers/application_helper_test.rb index ab52017ff..d2c17a115 100644 --- a/test/unit/helpers/application_helper_test.rb +++ b/test/unit/helpers/application_helper_test.rb @@ -20,6 +20,7 @@ require File.expand_path('../../../test_helper', __FILE__) class ApplicationHelperTest < ActionView::TestCase + include Redmine::I18n include ERB::Util include Rails.application.routes.url_helpers @@ -96,7 +97,7 @@ class ApplicationHelperTest < ActionView::TestCase if 'ruby'.respond_to?(:encoding) def test_auto_links_with_non_ascii_characters to_test = { - 'http://foo.bar/тест' => 'http://foo.bar/тест' + 'http://foo.bar/теÑ�Ñ‚' => 'http://foo.bar/теÑ�Ñ‚' } to_test.each { |text, result| assert_equal "

#{result}

", textilizable(text) } end @@ -250,7 +251,7 @@ RAW if 'ruby'.respond_to?(:encoding) def test_textile_external_links_with_non_ascii_characters to_test = { - 'This is a "link":http://foo.bar/тест' => 'This is a link' + 'This is a "link":http://foo.bar/теÑ�Ñ‚' => 'This is a link' } to_test.each { |text, result| assert_equal "

#{result}

", textilizable(text) } end @@ -596,7 +597,7 @@ RAW '[[CookBook documentation#One-section]]' => 'CookBook documentation', '[[Another page#anchor|Page]]' => 'Page', # UTF8 anchor - '[[Another_page#Тест|Тест]]' => %|Тест|, + '[[Another_page#ТеÑ�Ñ‚|ТеÑ�Ñ‚]]' => %|ТеÑ�Ñ‚|, # page that doesn't exist '[[Unknown page]]' => 'Unknown page', '[[Unknown page|404]]' => '404', diff --git a/test/unit/helpers/issues_helper_test.rb b/test/unit/helpers/issues_helper_test.rb index 172ec69fc..327ca0710 100644 --- a/test/unit/helpers/issues_helper_test.rb +++ b/test/unit/helpers/issues_helper_test.rb @@ -19,6 +19,7 @@ require File.expand_path('../../../test_helper', __FILE__) class IssuesHelperTest < ActionView::TestCase include ApplicationHelper + include Redmine::I18n include IssuesHelper include CustomFieldsHelper include ERB::Util diff --git a/test/unit/helpers/projects_helper_test.rb b/test/unit/helpers/projects_helper_test.rb index c8fe57452..7661925a6 100644 --- a/test/unit/helpers/projects_helper_test.rb +++ b/test/unit/helpers/projects_helper_test.rb @@ -20,6 +20,7 @@ require File.expand_path('../../../test_helper', __FILE__) class ProjectsHelperTest < ActionView::TestCase include ApplicationHelper include ProjectsHelper + include Redmine::I18n include ERB::Util fixtures :projects, :trackers, :issue_statuses, :issues, diff --git a/test/unit/helpers/queries_helper_test.rb b/test/unit/helpers/queries_helper_test.rb index 3cb5d1373..63d8a6852 100644 --- a/test/unit/helpers/queries_helper_test.rb +++ b/test/unit/helpers/queries_helper_test.rb @@ -19,6 +19,7 @@ require File.expand_path('../../../test_helper', __FILE__) class QueriesHelperTest < ActionView::TestCase include QueriesHelper + include Redmine::I18n fixtures :projects, :enabled_modules, :users, :members, :member_roles, :roles, :trackers, :issue_statuses, diff --git a/test/unit/helpers/search_helper_test.rb b/test/unit/helpers/search_helper_test.rb index 204f306b2..c7c94d4e5 100644 --- a/test/unit/helpers/search_helper_test.rb +++ b/test/unit/helpers/search_helper_test.rb @@ -21,6 +21,7 @@ require File.expand_path('../../../test_helper', __FILE__) class SearchHelperTest < ActionView::TestCase include SearchHelper + include Redmine::I18n include ERB::Util def test_highlight_single_token diff --git a/test/unit/helpers/sort_helper_test.rb b/test/unit/helpers/sort_helper_test.rb index 69df0117f..a80aba1b9 100644 --- a/test/unit/helpers/sort_helper_test.rb +++ b/test/unit/helpers/sort_helper_test.rb @@ -19,6 +19,7 @@ require File.expand_path('../../../test_helper', __FILE__) class SortHelperTest < ActionView::TestCase include SortHelper + include Redmine::I18n include ERB::Util def setup diff --git a/test/unit/helpers/timelog_helper_test.rb b/test/unit/helpers/timelog_helper_test.rb index ee29957f5..0396360d2 100644 --- a/test/unit/helpers/timelog_helper_test.rb +++ b/test/unit/helpers/timelog_helper_test.rb @@ -19,6 +19,7 @@ require File.expand_path('../../../test_helper', __FILE__) class TimelogHelperTest < ActionView::TestCase include TimelogHelper + include Redmine::I18n include ActionView::Helpers::TextHelper include ActionView::Helpers::DateHelper include ERB::Util