summaryrefslogtreecommitdiffstats
path: root/test/unit
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2018-12-02 07:54:49 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2018-12-02 07:54:49 +0000
commit0e9837e4d15bd8d90e0da4d030d95d9bf56020d9 (patch)
tree36af7bf2f2b6a9deaaff5c3015aa85a7bcf446c5 /test/unit
parent8dd6874a6aedc8b85e8420e1979fe964f4fd04ce (diff)
downloadredmine-0e9837e4d15bd8d90e0da4d030d95d9bf56020d9.tar.gz
redmine-0e9837e4d15bd8d90e0da4d030d95d9bf56020d9.zip
Current user should be nil to prevent ActiveJob::DeserializationError errors in tests.
git-svn-id: http://svn.redmine.org/redmine/trunk@17679 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/principal_test.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/unit/principal_test.rb b/test/unit/principal_test.rb
index 3fbd2bb05..d5c810741 100644
--- a/test/unit/principal_test.rb
+++ b/test/unit/principal_test.rb
@@ -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