]> 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>
Thu, 29 Nov 2018 22:20:14 +0000 (22:20 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Thu, 29 Nov 2018 22:20:14 +0000 (22:20 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@17666 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/unit/document_test.rb

index e4243dd600e5f3b9c5428cefd755b9d3f8786fc9..7c409e927bb00b3cba9e2df6acf746f42d016f40 100644 (file)
@@ -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