]> source.dussan.org Git - redmine.git/commitdiff
Include Redmine::I18n in helpers tests.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 18 May 2013 20:29:40 +0000 (20:29 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 18 May 2013 20:29:40 +0000 (20:29 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11875 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/unit/helpers/activities_helper_test.rb
test/unit/helpers/application_helper_test.rb
test/unit/helpers/issues_helper_test.rb
test/unit/helpers/projects_helper_test.rb
test/unit/helpers/queries_helper_test.rb
test/unit/helpers/search_helper_test.rb
test/unit/helpers/sort_helper_test.rb
test/unit/helpers/timelog_helper_test.rb

index e7785dde438bec2bc9a4b8865c49dc7527b618d7..47c0b6c0b9776868602a3715cb9785fae8c8dd41 100644 (file)
@@ -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
index ab52017ffd90ea60d253dc1c5ee76cf28cf25867..d2c17a115980dcdb816cc39463863f8a1d4151fb 100644 (file)
@@ -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/тест' => '<a class="external" href="http://foo.bar/тест">http://foo.bar/тест</a>'
+        'http://foo.bar/теÑ�Ñ‚' => '<a class="external" href="http://foo.bar/теÑ�Ñ‚">http://foo.bar/теÑ�Ñ‚</a>'
       }
       to_test.each { |text, result| assert_equal "<p>#{result}</p>", 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 <a href="http://foo.bar/тест" class="external">link</a>'
+        'This is a "link":http://foo.bar/теÑ�Ñ‚' => 'This is a <a href="http://foo.bar/теÑ�Ñ‚" class="external">link</a>'
       }
       to_test.each { |text, result| assert_equal "<p>#{result}</p>", textilizable(text) }
     end
@@ -596,7 +597,7 @@ RAW
       '[[CookBook documentation#One-section]]' => '<a href="/projects/ecookbook/wiki/CookBook_documentation#One-section" class="wiki-page">CookBook documentation</a>',
       '[[Another page#anchor|Page]]' => '<a href="/projects/ecookbook/wiki/Another_page#anchor" class="wiki-page">Page</a>',
       # UTF8 anchor
-      '[[Another_page#Тест|Тест]]' => %|<a href="/projects/ecookbook/wiki/Another_page##{CGI.escape 'Тест'}" class="wiki-page">Тест</a>|,
+      '[[Another_page#ТеÑ�Ñ‚|ТеÑ�Ñ‚]]' => %|<a href="/projects/ecookbook/wiki/Another_page##{CGI.escape 'ТеÑ�Ñ‚'}" class="wiki-page">ТеÑ�Ñ‚</a>|,
       # page that doesn't exist
       '[[Unknown page]]' => '<a href="/projects/ecookbook/wiki/Unknown_page" class="wiki-page new">Unknown page</a>',
       '[[Unknown page|404]]' => '<a href="/projects/ecookbook/wiki/Unknown_page" class="wiki-page new">404</a>',
index 172ec69fcdb4d65c378aee16ffe3d1aed55a0ce7..327ca07100cfdbffbe478ae41be205f41959b8a3 100644 (file)
@@ -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
index c8fe574528a955405b5cf670dc10610c3850af10..7661925a60ca06c9ce24289c9085d93e1b933034 100644 (file)
@@ -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,
index 3cb5d1373a102c7207dbf26f5d25f8706f85e953..63d8a6852ad6f5f77dbd3b1314ecd7de76f21e5a 100644 (file)
@@ -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,
index 204f306b2863f247b39b67960d199fa41b2ab832..c7c94d4e50660cd366d9d44177e483b055495e6b 100644 (file)
@@ -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
index 69df0117f08b63d41555424c8b366bd8b2389463..a80aba1b979d1db9de67080afd9c1aa90d0f8df2 100644 (file)
@@ -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
index ee29957f52dab9b46da669f21d4c2c9d46b2691a..0396360d2a082fa10ab158f99908faa47b47403a 100644 (file)
@@ -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