From: Jean-Philippe Lang Date: Thu, 29 Nov 2018 22:20:14 +0000 (+0000) Subject: Current user should be nil to prevent ActiveJob::DeserializationError errors in tests. X-Git-Tag: 4.0.0~37 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=198212f991573308b74d93a1e524497dd222dfc4;p=redmine.git Current user should be nil to prevent ActiveJob::DeserializationError errors in tests. git-svn-id: http://svn.redmine.org/redmine/trunk@17666 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/test/unit/document_test.rb b/test/unit/document_test.rb index e4243dd60..7c409e927 100644 --- a/test/unit/document_test.rb +++ b/test/unit/document_test.rb @@ -23,6 +23,10 @@ class DocumentTest < ActiveSupport::TestCase :users, :email_addresses, :members, :member_roles, :roles, :groups_users + def setup + User.current = nil + end + def test_create doc = Document.new(:project => Project.find(1), :title => 'New document', :category => Enumeration.find_by_name('User documentation')) assert doc.save