summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2017-01-19 23:22:26 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2017-01-19 23:22:26 +0000
commit9d747d6811ed8716d2ff157e5fc3564946ae2ec5 (patch)
treed4d8bf9223467a2d79d665cbd9fc8d13865c5132 /test
parent4ac9dc3075a3daa7e52700899b52d23db01915ce (diff)
downloadredmine-9d747d6811ed8716d2ff157e5fc3564946ae2ec5.tar.gz
redmine-9d747d6811ed8716d2ff157e5fc3564946ae2ec5.zip
Reset current user before helpers tests.
git-svn-id: http://svn.redmine.org/redmine/trunk@16231 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r--test/test_helper.rb5
-rw-r--r--test/unit/helpers/activities_helper_test.rb1
-rw-r--r--test/unit/helpers/issues_helper_test.rb1
-rw-r--r--test/unit/helpers/projects_helper_test.rb1
-rw-r--r--test/unit/helpers/sort_helper_test.rb1
-rw-r--r--test/unit/helpers/timelog_helper_test.rb4
-rw-r--r--test/unit/helpers/watchers_helper_test.rb1
7 files changed, 6 insertions, 8 deletions
diff --git a/test/test_helper.rb b/test/test_helper.rb
index 1ab7e9e03..11bd52c83 100644
--- a/test/test_helper.rb
+++ b/test/test_helper.rb
@@ -278,7 +278,10 @@ module Redmine
end
class HelperTest < ActionView::TestCase
-
+ def setup
+ super
+ User.current = nil
+ end
end
class ControllerTest < ActionController::TestCase
diff --git a/test/unit/helpers/activities_helper_test.rb b/test/unit/helpers/activities_helper_test.rb
index 2a31d14be..a7df3c6ac 100644
--- a/test/unit/helpers/activities_helper_test.rb
+++ b/test/unit/helpers/activities_helper_test.rb
@@ -38,6 +38,7 @@ class ActivitiesHelperTest < Redmine::HelperTest
end
def setup
+ super
MockEvent.clear
end
diff --git a/test/unit/helpers/issues_helper_test.rb b/test/unit/helpers/issues_helper_test.rb
index 514d8314e..d61847068 100644
--- a/test/unit/helpers/issues_helper_test.rb
+++ b/test/unit/helpers/issues_helper_test.rb
@@ -38,7 +38,6 @@ class IssuesHelperTest < Redmine::HelperTest
def setup
super
set_language_if_valid('en')
- User.current = nil
end
def test_issue_heading
diff --git a/test/unit/helpers/projects_helper_test.rb b/test/unit/helpers/projects_helper_test.rb
index c72efff80..2e874141d 100644
--- a/test/unit/helpers/projects_helper_test.rb
+++ b/test/unit/helpers/projects_helper_test.rb
@@ -36,7 +36,6 @@ class ProjectsHelperTest < Redmine::HelperTest
def setup
super
set_language_if_valid('en')
- User.current = nil
end
def test_link_to_version_within_project
diff --git a/test/unit/helpers/sort_helper_test.rb b/test/unit/helpers/sort_helper_test.rb
index 605fd99d7..3aedccaf7 100644
--- a/test/unit/helpers/sort_helper_test.rb
+++ b/test/unit/helpers/sort_helper_test.rb
@@ -23,6 +23,7 @@ class SortHelperTest < Redmine::HelperTest
include ERB::Util
def setup
+ super
@session = nil
@sort_param = nil
end
diff --git a/test/unit/helpers/timelog_helper_test.rb b/test/unit/helpers/timelog_helper_test.rb
index cec1e2cb0..ad04b99f2 100644
--- a/test/unit/helpers/timelog_helper_test.rb
+++ b/test/unit/helpers/timelog_helper_test.rb
@@ -32,10 +32,6 @@ class TimelogHelperTest < Redmine::HelperTest
:attachments,
:enumerations
- def setup
- super
- end
-
def test_activities_collection_for_select_options_should_return_array_of_activity_names_and_ids
activities = activity_collection_for_select_options
assert activities.include?(["Design", 9])
diff --git a/test/unit/helpers/watchers_helper_test.rb b/test/unit/helpers/watchers_helper_test.rb
index 9e46f64b0..2dccfa172 100644
--- a/test/unit/helpers/watchers_helper_test.rb
+++ b/test/unit/helpers/watchers_helper_test.rb
@@ -27,7 +27,6 @@ class WatchersHelperTest < Redmine::HelperTest
def setup
super
set_language_if_valid('en')
- User.current = nil
end
test '#watcher_link with a non-watched object' do