From: Jean-Philippe Lang Date: Sun, 2 Dec 2018 07:54:49 +0000 (+0000) Subject: Current user should be nil to prevent ActiveJob::DeserializationError errors in tests. X-Git-Tag: 4.0.0~24 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=0e9837e4d15bd8d90e0da4d030d95d9bf56020d9;p=redmine.git 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 --- 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