]> source.dussan.org Git - redmine.git/commitdiff
Reset current user before helpers tests.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Thu, 19 Jan 2017 23:22:26 +0000 (23:22 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Thu, 19 Jan 2017 23:22:26 +0000 (23:22 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@16231 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/test_helper.rb
test/unit/helpers/activities_helper_test.rb
test/unit/helpers/issues_helper_test.rb
test/unit/helpers/projects_helper_test.rb
test/unit/helpers/sort_helper_test.rb
test/unit/helpers/timelog_helper_test.rb
test/unit/helpers/watchers_helper_test.rb

index 1ab7e9e03a6716304c1002880935c70c0973a81d..11bd52c8330fc9f11dd141346502a541beef5d04 100644 (file)
@@ -278,7 +278,10 @@ module Redmine
   end
 
   class HelperTest < ActionView::TestCase
-    
+    def setup
+      super
+      User.current = nil
+    end
   end
 
   class ControllerTest < ActionController::TestCase
index 2a31d14be9902231dc8750bc8f5562ec33ab7c9e..a7df3c6ac90eb38b097a548133083f05ee2e2b9b 100644 (file)
@@ -38,6 +38,7 @@ class ActivitiesHelperTest < Redmine::HelperTest
   end
 
   def setup
+    super
     MockEvent.clear
   end
 
index 514d8314ef8f81b562ca79a542d3e7f912287ff2..d618470680e533d5c0d2598ea8a3cfa748077092 100644 (file)
@@ -38,7 +38,6 @@ class IssuesHelperTest < Redmine::HelperTest
   def setup
     super
     set_language_if_valid('en')
-    User.current = nil
   end
 
   def test_issue_heading
index c72efff80aa602287089b90ddaebba38abc76ef0..2e874141d5c9b1b94dd91993f6ff5e9df73040b9 100644 (file)
@@ -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
index 605fd99d774a81bc52fa112bdd92116efdd4581a..3aedccaf77e92539af8dcb13e25233e64ccd113f 100644 (file)
@@ -23,6 +23,7 @@ class SortHelperTest < Redmine::HelperTest
   include ERB::Util
 
   def setup
+    super
     @session = nil
     @sort_param = nil
   end
index cec1e2cb07159dc6689d45f2b829c992fa35be7c..ad04b99f2ae2ce5fe091125b22ac8fd02c0d9c76 100644 (file)
@@ -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])
index 9e46f64b032afa9b1dd519620c4961469f9d6941..2dccfa17251ec7b3de3b014796ee79853d1c0706 100644 (file)
@@ -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