mirror of
https://github.com/github/rails.git
synced 2026-04-04 03:00:58 -04:00
add the TestCase.fixture_path when testing file uploads
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4058 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
@@ -436,7 +436,7 @@ module ActionController #:nodoc:
|
||||
# post :change_avatar, :avatar => fixture_file_upload('/files/spongebob.png', 'image/png')
|
||||
def fixture_file_upload(path, mime_type = nil)
|
||||
ActionController::TestUploadedFile.new(
|
||||
Test::Unit::TestCase.respond_to?(:fixture_path) ? Test::Unit::TestCase + path : path,
|
||||
Test::Unit::TestCase.respond_to?(:fixture_path) ? Test::Unit::TestCase.fixture_path + path : path,
|
||||
mime_type
|
||||
)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user