1
0
mirror of https://github.com/meineerde/redmine.git synced 2025-12-26 10:21:14 +00:00

Fix that the following tests fail randomly due to uninitialized User.current (#29853):

* AttachmentsVisibilityTest#test_attachment_should_be_visible
*
Redmine::AttachmentFieldFormatTest#test_should_accept_a_hash_with_upload_on_create
*
Redmine::AttachmentFieldFormatTest#test_should_replace_attachment_on_update

Patch by Gilad Shanan.


git-svn-id: http://svn.redmine.org/redmine/trunk@17616 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Go MAEDA 2018-11-03 07:15:00 +00:00
parent dced476200
commit 46b028b1b8
3 changed files with 6 additions and 0 deletions

View File

@ -26,6 +26,7 @@ class AttachmentsVisibilityTest < Redmine::ControllerTest
:issues, :trackers, :versions
def setup
User.current = nil
set_tmp_attachments_directory
@field = IssueCustomField.generate!(:field_format => 'attachment', :visible => true)

View File

@ -20,6 +20,10 @@ require File.expand_path('../../../test_helper', __FILE__)
class Redmine::ApiTest::AuthenticationTest < Redmine::ApiTest::Base
fixtures :users
def teardown
User.current = nil
end
def test_api_should_deny_without_credentials
get '/users/current.xml'
assert_response 401

View File

@ -35,6 +35,7 @@ class AttachmentFieldFormatTest < Redmine::IntegrationTest
:attachments
def setup
User.current = nil
set_tmp_attachments_directory
@field = IssueCustomField.generate!(:name => "File", :field_format => "attachment")
log_user "jsmith", "jsmith"