Reset current user before helpers tests.

git-svn-id: http://svn.redmine.org/redmine/trunk@16231 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2017-01-19 23:22:26 +00:00
parent 4ac9dc3075
commit 9d747d6811
7 changed files with 6 additions and 8 deletions

View File

@@ -278,7 +278,10 @@ module Redmine
end end
class HelperTest < ActionView::TestCase class HelperTest < ActionView::TestCase
def setup
super
User.current = nil
end
end end
class ControllerTest < ActionController::TestCase class ControllerTest < ActionController::TestCase

View File

@@ -38,6 +38,7 @@ class ActivitiesHelperTest < Redmine::HelperTest
end end
def setup def setup
super
MockEvent.clear MockEvent.clear
end end

View File

@@ -38,7 +38,6 @@ class IssuesHelperTest < Redmine::HelperTest
def setup def setup
super super
set_language_if_valid('en') set_language_if_valid('en')
User.current = nil
end end
def test_issue_heading def test_issue_heading

View File

@@ -36,7 +36,6 @@ class ProjectsHelperTest < Redmine::HelperTest
def setup def setup
super super
set_language_if_valid('en') set_language_if_valid('en')
User.current = nil
end end
def test_link_to_version_within_project def test_link_to_version_within_project

View File

@@ -23,6 +23,7 @@ class SortHelperTest < Redmine::HelperTest
include ERB::Util include ERB::Util
def setup def setup
super
@session = nil @session = nil
@sort_param = nil @sort_param = nil
end end

View File

@@ -32,10 +32,6 @@ class TimelogHelperTest < Redmine::HelperTest
:attachments, :attachments,
:enumerations :enumerations
def setup
super
end
def test_activities_collection_for_select_options_should_return_array_of_activity_names_and_ids def test_activities_collection_for_select_options_should_return_array_of_activity_names_and_ids
activities = activity_collection_for_select_options activities = activity_collection_for_select_options
assert activities.include?(["Design", 9]) assert activities.include?(["Design", 9])

View File

@@ -27,7 +27,6 @@ class WatchersHelperTest < Redmine::HelperTest
def setup def setup
super super
set_language_if_valid('en') set_language_if_valid('en')
User.current = nil
end end
test '#watcher_link with a non-watched object' do test '#watcher_link with a non-watched object' do