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:
parent
dced476200
commit
46b028b1b8
@ -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)
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user