summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2016-07-16 11:36:57 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2016-07-16 11:36:57 +0000
commitc4b4b8a71e21af1fc75ad284453df6be93326d32 (patch)
tree929311a023961bce553431bb11e1c76516b83eb2
parent745833a66c3526cff3f85543da722d6ebedd53b1 (diff)
downloadredmine-c4b4b8a71e21af1fc75ad284453df6be93326d32.tar.gz
redmine-c4b4b8a71e21af1fc75ad284453df6be93326d32.zip
Adds a class for testing helpers.
git-svn-id: http://svn.redmine.org/redmine/trunk@15683 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--test/test_helper.rb4
-rw-r--r--test/unit/helpers/activities_helper_test.rb2
-rw-r--r--test/unit/helpers/application_helper_test.rb2
-rw-r--r--test/unit/helpers/custom_fields_helper_test.rb2
-rw-r--r--test/unit/helpers/groups_helper_test.rb2
-rw-r--r--test/unit/helpers/issues_helper_test.rb2
-rw-r--r--test/unit/helpers/journals_helper_test.rb2
-rw-r--r--test/unit/helpers/members_helper_test.rb2
-rw-r--r--test/unit/helpers/my_helper_test.rb2
-rw-r--r--test/unit/helpers/projects_helper_test.rb2
-rw-r--r--test/unit/helpers/queries_helper_test.rb2
-rw-r--r--test/unit/helpers/routes_helper_test.rb2
-rw-r--r--test/unit/helpers/search_helper_test.rb2
-rw-r--r--test/unit/helpers/settings_helper_test.rb2
-rw-r--r--test/unit/helpers/sort_helper_test.rb2
-rw-r--r--test/unit/helpers/timelog_helper_test.rb2
-rw-r--r--test/unit/helpers/version_helper_test.rb2
-rw-r--r--test/unit/helpers/watchers_helper_test.rb2
-rw-r--r--test/unit/helpers/wiki_helper_test.rb2
19 files changed, 22 insertions, 18 deletions
diff --git a/test/test_helper.rb b/test/test_helper.rb
index 5ad64517b..2572495df 100644
--- a/test/test_helper.rb
+++ b/test/test_helper.rb
@@ -277,6 +277,10 @@ module Redmine
end
end
+ class HelperTest < ActionView::TestCase
+
+ end
+
class ControllerTest < ActionController::TestCase
def process(method, path, parameters={}, session={}, flash={})
if parameters.key?(:params) || parameters.key?(:session)
diff --git a/test/unit/helpers/activities_helper_test.rb b/test/unit/helpers/activities_helper_test.rb
index 57c93fa44..2a31d14be 100644
--- a/test/unit/helpers/activities_helper_test.rb
+++ b/test/unit/helpers/activities_helper_test.rb
@@ -17,7 +17,7 @@
require File.expand_path('../../../test_helper', __FILE__)
-class ActivitiesHelperTest < ActionView::TestCase
+class ActivitiesHelperTest < Redmine::HelperTest
include ActivitiesHelper
include Redmine::I18n
diff --git a/test/unit/helpers/application_helper_test.rb b/test/unit/helpers/application_helper_test.rb
index 48260ccf7..7940ca132 100644
--- a/test/unit/helpers/application_helper_test.rb
+++ b/test/unit/helpers/application_helper_test.rb
@@ -19,7 +19,7 @@
require File.expand_path('../../../test_helper', __FILE__)
-class ApplicationHelperTest < ActionView::TestCase
+class ApplicationHelperTest < Redmine::HelperTest
include Redmine::I18n
include ERB::Util
include Rails.application.routes.url_helpers
diff --git a/test/unit/helpers/custom_fields_helper_test.rb b/test/unit/helpers/custom_fields_helper_test.rb
index 5ee500f3e..7e352a9aa 100644
--- a/test/unit/helpers/custom_fields_helper_test.rb
+++ b/test/unit/helpers/custom_fields_helper_test.rb
@@ -17,7 +17,7 @@
require File.expand_path('../../../test_helper', __FILE__)
-class CustomFieldsHelperTest < ActionView::TestCase
+class CustomFieldsHelperTest < Redmine::HelperTest
include ApplicationHelper
include CustomFieldsHelper
include Redmine::I18n
diff --git a/test/unit/helpers/groups_helper_test.rb b/test/unit/helpers/groups_helper_test.rb
index dc30470d8..b927a1d72 100644
--- a/test/unit/helpers/groups_helper_test.rb
+++ b/test/unit/helpers/groups_helper_test.rb
@@ -17,7 +17,7 @@
require File.expand_path('../../../test_helper', __FILE__)
-class GroupsHelperTest < ActionView::TestCase
+class GroupsHelperTest < Redmine::HelperTest
include Redmine::I18n
include ERB::Util
include GroupsHelper
diff --git a/test/unit/helpers/issues_helper_test.rb b/test/unit/helpers/issues_helper_test.rb
index 63f8be0a6..0a31ddb3b 100644
--- a/test/unit/helpers/issues_helper_test.rb
+++ b/test/unit/helpers/issues_helper_test.rb
@@ -17,7 +17,7 @@
require File.expand_path('../../../test_helper', __FILE__)
-class IssuesHelperTest < ActionView::TestCase
+class IssuesHelperTest < Redmine::HelperTest
include Redmine::I18n
include IssuesHelper
include CustomFieldsHelper
diff --git a/test/unit/helpers/journals_helper_test.rb b/test/unit/helpers/journals_helper_test.rb
index c33a1081a..057dc7fac 100644
--- a/test/unit/helpers/journals_helper_test.rb
+++ b/test/unit/helpers/journals_helper_test.rb
@@ -17,7 +17,7 @@
require File.expand_path('../../../test_helper', __FILE__)
-class JournalsHelperTest < ActionView::TestCase
+class JournalsHelperTest < Redmine::HelperTest
include JournalsHelper
fixtures :projects, :trackers, :issue_statuses, :issues,
diff --git a/test/unit/helpers/members_helper_test.rb b/test/unit/helpers/members_helper_test.rb
index c9d7b09a4..0f2cf8939 100644
--- a/test/unit/helpers/members_helper_test.rb
+++ b/test/unit/helpers/members_helper_test.rb
@@ -17,7 +17,7 @@
require File.expand_path('../../../test_helper', __FILE__)
-class MembersHelperTest < ActionView::TestCase
+class MembersHelperTest < Redmine::HelperTest
include Redmine::I18n
include ERB::Util
include MembersHelper
diff --git a/test/unit/helpers/my_helper_test.rb b/test/unit/helpers/my_helper_test.rb
index 2b7fa32cc..dc03c5662 100644
--- a/test/unit/helpers/my_helper_test.rb
+++ b/test/unit/helpers/my_helper_test.rb
@@ -17,7 +17,7 @@
require File.expand_path('../../../test_helper', __FILE__)
-class MyHelperTest < ActionView::TestCase
+class MyHelperTest < Redmine::HelperTest
include Redmine::I18n
include ERB::Util
include MyHelper
diff --git a/test/unit/helpers/projects_helper_test.rb b/test/unit/helpers/projects_helper_test.rb
index 8a06a24f0..c72efff80 100644
--- a/test/unit/helpers/projects_helper_test.rb
+++ b/test/unit/helpers/projects_helper_test.rb
@@ -17,7 +17,7 @@
require File.expand_path('../../../test_helper', __FILE__)
-class ProjectsHelperTest < ActionView::TestCase
+class ProjectsHelperTest < Redmine::HelperTest
include ApplicationHelper
include ProjectsHelper
include Redmine::I18n
diff --git a/test/unit/helpers/queries_helper_test.rb b/test/unit/helpers/queries_helper_test.rb
index 485593806..c57315242 100644
--- a/test/unit/helpers/queries_helper_test.rb
+++ b/test/unit/helpers/queries_helper_test.rb
@@ -17,7 +17,7 @@
require File.expand_path('../../../test_helper', __FILE__)
-class QueriesHelperTest < ActionView::TestCase
+class QueriesHelperTest < Redmine::HelperTest
include QueriesHelper
include Redmine::I18n
diff --git a/test/unit/helpers/routes_helper_test.rb b/test/unit/helpers/routes_helper_test.rb
index ec977c156..1e58d7f8f 100644
--- a/test/unit/helpers/routes_helper_test.rb
+++ b/test/unit/helpers/routes_helper_test.rb
@@ -19,7 +19,7 @@
require File.expand_path('../../../test_helper', __FILE__)
-class RoutesHelperTest < ActionView::TestCase
+class RoutesHelperTest < Redmine::HelperTest
fixtures :projects, :issues
include Rails.application.routes.url_helpers
diff --git a/test/unit/helpers/search_helper_test.rb b/test/unit/helpers/search_helper_test.rb
index 07b58ac0a..6e1b1ac17 100644
--- a/test/unit/helpers/search_helper_test.rb
+++ b/test/unit/helpers/search_helper_test.rb
@@ -19,7 +19,7 @@
require File.expand_path('../../../test_helper', __FILE__)
-class SearchHelperTest < ActionView::TestCase
+class SearchHelperTest < Redmine::HelperTest
include SearchHelper
include Redmine::I18n
include ERB::Util
diff --git a/test/unit/helpers/settings_helper_test.rb b/test/unit/helpers/settings_helper_test.rb
index be37fb702..42dc7a579 100644
--- a/test/unit/helpers/settings_helper_test.rb
+++ b/test/unit/helpers/settings_helper_test.rb
@@ -17,7 +17,7 @@
require File.expand_path('../../../test_helper', __FILE__)
-class SettingsHelperTest < ActionView::TestCase
+class SettingsHelperTest < Redmine::HelperTest
include SettingsHelper
include Redmine::I18n
include ERB::Util
diff --git a/test/unit/helpers/sort_helper_test.rb b/test/unit/helpers/sort_helper_test.rb
index c9e561dd6..605fd99d7 100644
--- a/test/unit/helpers/sort_helper_test.rb
+++ b/test/unit/helpers/sort_helper_test.rb
@@ -17,7 +17,7 @@
require File.expand_path('../../../test_helper', __FILE__)
-class SortHelperTest < ActionView::TestCase
+class SortHelperTest < Redmine::HelperTest
include SortHelper
include Redmine::I18n
include ERB::Util
diff --git a/test/unit/helpers/timelog_helper_test.rb b/test/unit/helpers/timelog_helper_test.rb
index 044981a3a..cec1e2cb0 100644
--- a/test/unit/helpers/timelog_helper_test.rb
+++ b/test/unit/helpers/timelog_helper_test.rb
@@ -17,7 +17,7 @@
require File.expand_path('../../../test_helper', __FILE__)
-class TimelogHelperTest < ActionView::TestCase
+class TimelogHelperTest < Redmine::HelperTest
include TimelogHelper
include Redmine::I18n
include ActionView::Helpers::TextHelper
diff --git a/test/unit/helpers/version_helper_test.rb b/test/unit/helpers/version_helper_test.rb
index 751a420b5..c6206b193 100644
--- a/test/unit/helpers/version_helper_test.rb
+++ b/test/unit/helpers/version_helper_test.rb
@@ -17,7 +17,7 @@
require File.expand_path('../../../test_helper', __FILE__)
-class VersionsHelperTest < ActionView::TestCase
+class VersionsHelperTest < Redmine::HelperTest
include Rails.application.routes.url_helpers
fixtures :projects, :versions
diff --git a/test/unit/helpers/watchers_helper_test.rb b/test/unit/helpers/watchers_helper_test.rb
index 1e567ab30..9e46f64b0 100644
--- a/test/unit/helpers/watchers_helper_test.rb
+++ b/test/unit/helpers/watchers_helper_test.rb
@@ -17,7 +17,7 @@
require File.expand_path('../../../test_helper', __FILE__)
-class WatchersHelperTest < ActionView::TestCase
+class WatchersHelperTest < Redmine::HelperTest
include WatchersHelper
include Redmine::I18n
include Rails.application.routes.url_helpers
diff --git a/test/unit/helpers/wiki_helper_test.rb b/test/unit/helpers/wiki_helper_test.rb
index 74dda891f..8624848fa 100644
--- a/test/unit/helpers/wiki_helper_test.rb
+++ b/test/unit/helpers/wiki_helper_test.rb
@@ -17,7 +17,7 @@
require File.expand_path('../../../test_helper', __FILE__)
-class WikiHelperTest < ActionView::TestCase
+class WikiHelperTest < Redmine::HelperTest
include WikiHelper
include Rails.application.routes.url_helpers