diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2013-12-04 07:09:17 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2013-12-04 07:09:17 +0000 |
commit | afda064058f4cf4ed62e3f08217af8409833bef6 (patch) | |
tree | 529fefaea93a0a1971ae9d55b2b6c0bef437d30b /test/unit/attachment_test.rb | |
parent | 8a123b178c385c1672e1df6f4cdb2adbb88ea40d (diff) | |
download | redmine-afda064058f4cf4ed62e3f08217af8409833bef6.tar.gz redmine-afda064058f4cf4ed62e3f08217af8409833bef6.zip |
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
Diffstat (limited to 'test/unit/attachment_test.rb')
-rw-r--r-- | test/unit/attachment_test.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/unit/attachment_test.rb b/test/unit/attachment_test.rb index a038042cb..c9100f3d0 100644 --- a/test/unit/attachment_test.rb +++ b/test/unit/attachment_test.rb @@ -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 |