remove trailing white-spaces from test/unit/attachment_test.rb

git-svn-id: http://svn.redmine.org/redmine/trunk@12356 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2013-12-04 07:09:17 +00:00
parent 8a123b178c
commit afda064058
1 changed files with 4 additions and 4 deletions

View File

@ -22,10 +22,10 @@ require File.expand_path('../../test_helper', __FILE__)
class AttachmentTest < ActiveSupport::TestCase
fixtures :users, :projects, :roles, :members, :member_roles,
:enabled_modules, :issues, :trackers, :attachments
class MockFile
attr_reader :original_filename, :content_type, :content, :size
def initialize(attributes)
@original_filename = attributes[:original_filename]
@content_type = attributes[:content_type]
@ -153,12 +153,12 @@ class AttachmentTest < ActiveSupport::TestCase
:author => User.find(1))
assert a1.disk_filename != a2.disk_filename
end
def test_filename_should_be_basenamed
a = Attachment.new(:file => MockFile.new(:original_filename => "path/to/the/file"))
assert_equal 'file', a.filename
end
def test_filename_should_be_sanitized
a = Attachment.new(:file => MockFile.new(:original_filename => "valid:[] invalid:?%*|\"'<>chars"))
assert_equal 'valid_[] invalid_chars', a.filename