summaryrefslogtreecommitdiffstats
path: root/test/unit
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2018-11-29 22:20:14 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2018-11-29 22:20:14 +0000
commit198212f991573308b74d93a1e524497dd222dfc4 (patch)
treed3807a4c0832109c6984fc0ed65d96bab80936ed /test/unit
parent1cadb28a6e1de597b24b6e9d12ea5b1095b45b1e (diff)
downloadredmine-198212f991573308b74d93a1e524497dd222dfc4.tar.gz
redmine-198212f991573308b74d93a1e524497dd222dfc4.zip
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
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/document_test.rb4
1 files changed, 4 insertions, 0 deletions
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