]> source.dussan.org Git - redmine.git/commitdiff
Current user should be nil to prevent ActiveJob::DeserializationError errors in tests.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 2 Dec 2018 07:54:49 +0000 (07:54 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 2 Dec 2018 07:54:49 +0000 (07:54 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@17679 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/unit/principal_test.rb

index 3fbd2bb053b43a6532ff2870d08964f67ab24c8b..d5c8107417d246c642d187c0f03d3811e56686e2 100644 (file)
@@ -23,6 +23,10 @@ class PrincipalTest < ActiveSupport::TestCase
   fixtures :users, :projects, :members, :member_roles, :roles,
            :email_addresses
 
+  def setup
+    User.current = nil
+  end
+
   def test_active_scope_should_return_groups_and_active_users
     result = Principal.active.to_a
     assert_include Group.first, result