Skip to content

Commit

Permalink
Reset locale to "en" before helpers tests.
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.redmine.org/redmine/trunk@16232 e93f8b46-1217-0410-a6f0-8f06a7374b81
  • Loading branch information
jplang committed Jan 19, 2017
1 parent 9d747d6 commit 09f4a7d
Show file tree
Hide file tree
Showing 15 changed files with 3 additions and 29 deletions.
3 changes: 3 additions & 0 deletions test/test_helper.rb
Expand Up @@ -278,9 +278,12 @@ def should_route(arg)
end

class HelperTest < ActionView::TestCase
include Redmine::I18n

def setup
super
User.current = nil
::I18n.locale = 'en'
end
end

Expand Down
1 change: 0 additions & 1 deletion test/unit/helpers/activities_helper_test.rb
Expand Up @@ -19,7 +19,6 @@

class ActivitiesHelperTest < Redmine::HelperTest
include ActivitiesHelper
include Redmine::I18n

class MockEvent
attr_reader :event_datetime, :event_group, :name
Expand Down
1 change: 0 additions & 1 deletion test/unit/helpers/application_helper_test.rb
Expand Up @@ -20,7 +20,6 @@
require File.expand_path('../../../test_helper', __FILE__)

class ApplicationHelperTest < Redmine::HelperTest
include Redmine::I18n
include ERB::Util
include Rails.application.routes.url_helpers

Expand Down
1 change: 0 additions & 1 deletion test/unit/helpers/custom_fields_helper_test.rb
Expand Up @@ -20,7 +20,6 @@
class CustomFieldsHelperTest < Redmine::HelperTest
include ApplicationHelper
include CustomFieldsHelper
include Redmine::I18n
include ERB::Util

def test_format_boolean_value
Expand Down
1 change: 0 additions & 1 deletion test/unit/helpers/groups_helper_test.rb
Expand Up @@ -18,7 +18,6 @@
require File.expand_path('../../../test_helper', __FILE__)

class GroupsHelperTest < Redmine::HelperTest
include Redmine::I18n
include ERB::Util
include GroupsHelper
include Rails.application.routes.url_helpers
Expand Down
6 changes: 0 additions & 6 deletions test/unit/helpers/issues_helper_test.rb
Expand Up @@ -18,7 +18,6 @@
require File.expand_path('../../../test_helper', __FILE__)

class IssuesHelperTest < Redmine::HelperTest
include Redmine::I18n
include IssuesHelper
include CustomFieldsHelper
include ERB::Util
Expand All @@ -35,11 +34,6 @@ class IssuesHelperTest < Redmine::HelperTest
:attachments,
:versions

def setup
super
set_language_if_valid('en')
end

def test_issue_heading
assert_equal "Bug #1", issue_heading(Issue.find(1))
end
Expand Down
1 change: 0 additions & 1 deletion test/unit/helpers/members_helper_test.rb
Expand Up @@ -18,7 +18,6 @@
require File.expand_path('../../../test_helper', __FILE__)

class MembersHelperTest < Redmine::HelperTest
include Redmine::I18n
include ERB::Util
include MembersHelper
include Rails.application.routes.url_helpers
Expand Down
1 change: 0 additions & 1 deletion test/unit/helpers/my_helper_test.rb
Expand Up @@ -18,7 +18,6 @@
require File.expand_path('../../../test_helper', __FILE__)

class MyHelperTest < Redmine::HelperTest
include Redmine::I18n
include ERB::Util
include MyHelper

Expand Down
6 changes: 0 additions & 6 deletions test/unit/helpers/projects_helper_test.rb
Expand Up @@ -20,7 +20,6 @@
class ProjectsHelperTest < Redmine::HelperTest
include ApplicationHelper
include ProjectsHelper
include Redmine::I18n
include ERB::Util
include Rails.application.routes.url_helpers

Expand All @@ -33,11 +32,6 @@ class ProjectsHelperTest < Redmine::HelperTest
:groups_users,
:enabled_modules

def setup
super
set_language_if_valid('en')
end

def test_link_to_version_within_project
@project = Project.find(2)
User.current = User.find(1)
Expand Down
1 change: 0 additions & 1 deletion test/unit/helpers/queries_helper_test.rb
Expand Up @@ -19,7 +19,6 @@

class QueriesHelperTest < Redmine::HelperTest
include QueriesHelper
include Redmine::I18n

fixtures :projects, :enabled_modules, :users, :members,
:member_roles, :roles, :trackers, :issue_statuses,
Expand Down
1 change: 0 additions & 1 deletion test/unit/helpers/search_helper_test.rb
Expand Up @@ -21,7 +21,6 @@

class SearchHelperTest < Redmine::HelperTest
include SearchHelper
include Redmine::I18n
include ERB::Util

def test_highlight_single_token
Expand Down
1 change: 0 additions & 1 deletion test/unit/helpers/settings_helper_test.rb
Expand Up @@ -19,7 +19,6 @@

class SettingsHelperTest < Redmine::HelperTest
include SettingsHelper
include Redmine::I18n
include ERB::Util

def test_date_format_setting_options_should_include_human_readable_format
Expand Down
1 change: 0 additions & 1 deletion test/unit/helpers/sort_helper_test.rb
Expand Up @@ -19,7 +19,6 @@

class SortHelperTest < Redmine::HelperTest
include SortHelper
include Redmine::I18n
include ERB::Util

def setup
Expand Down
1 change: 0 additions & 1 deletion test/unit/helpers/timelog_helper_test.rb
Expand Up @@ -19,7 +19,6 @@

class TimelogHelperTest < Redmine::HelperTest
include TimelogHelper
include Redmine::I18n
include ActionView::Helpers::TextHelper
include ActionView::Helpers::DateHelper
include ERB::Util
Expand Down
6 changes: 0 additions & 6 deletions test/unit/helpers/watchers_helper_test.rb
Expand Up @@ -19,16 +19,10 @@

class WatchersHelperTest < Redmine::HelperTest
include WatchersHelper
include Redmine::I18n
include Rails.application.routes.url_helpers

fixtures :users, :issues

def setup
super
set_language_if_valid('en')
end

test '#watcher_link with a non-watched object' do
expected = link_to(
"Watch",
Expand Down

0 comments on commit 09f4a7d

Please sign in to comment.