Commit Graph

38 Commits

Author SHA1 Message Date
Toshi MARUYAMA 8a6f4c3880 Rails4: replace deprecated Relation#first with finder options at AttachmentTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12500 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-08 02:49:09 +00:00
Toshi MARUYAMA afda064058 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
2013-12-04 07:09:17 +00:00
Jean-Philippe Lang 02fca76c13 Strip eols from file names (#14819).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@12128 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-09-11 19:19:24 +00:00
Toshi MARUYAMA c49451eb10 not use assert_not_nil in Errors#[]
r7593 etc. replaced Rails2 Errors#on.
Rails3 Errors#[] always return array.
So, Rails3 Errors#[] is always not nil.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@12070 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-07-30 08:23:54 +00:00
Jean-Philippe Lang 14b50dfbab Removing shoulda context.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11315 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-02-03 09:20:05 +00:00
Jean-Philippe Lang e396a0eebe Copyright for 2013 (#12788).
Patch by Daniel Felix.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11169 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-01-12 09:29:31 +00:00
Jean-Philippe Lang d46a0a3a4f NoMethodError: private method `now' called for DateTime:Class error in tests with ruby < 1.9.3 (#5298).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10993 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-12-13 13:18:41 +00:00
Jean-Philippe Lang c99b638d61 Store attachments in subdirectories (#5298).
Existing files can be moved to their target subdirectories using rake redmine:attachments:move_to_subdirectories.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10990 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-12-13 12:07:19 +00:00
Jean-Philippe Lang 5c2de4dfc9 Adds Attachment#title.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10012 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-16 16:42:23 +00:00
Jean-Philippe Lang 7f0bb136ad Validate attachment description length (#11365).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9984 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-15 14:42:00 +00:00
Jean-Philippe Lang a0c495b953 Displays thumbnails of attached images of the issue view (#1006).
This behaviour can be turned on/off in Settings -> Display (off by default). Thumbnail size can be configured there too.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9933 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-07 13:48:07 +00:00
Jean-Philippe Lang ba5a052c8c Copyright update.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9636 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-05 12:56:53 +00:00
Jean-Philippe Lang 4a6de486ba Use fixture.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8983 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-02-24 21:24:00 +00:00
Jean-Philippe Lang b455ac2a27 Adds a rake test that removes old unattached uploads (#10253).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8893 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-02-16 21:18:01 +00:00
Jean-Philippe Lang d4e6355eb3 Better handling of attachments when issue validation fails (#10253).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8891 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-02-16 21:00:11 +00:00
Jean-Philippe Lang 8a3623733f Copy attachments on issue and project copy (#3055).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8676 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-01-20 17:56:28 +00:00
Jean-Philippe Lang ad25e3807d Make sure that tests restore the attachments path to the tmp dir so that fixture files don't get deleted.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8248 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-12-16 17:52:47 +00:00
Jean-Philippe Lang 902b3078d5 Limit the characters stripped by Attachment#sanitize_filename (#4324).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7917 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-11-24 20:17:56 +00:00
Toshi MARUYAMA be29227c12 reset Attachment.storage_path at the end of attachment tests
Attachment files are deleted when database data were deleted.
So, other tests fail.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7911 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-11-24 08:10:41 +00:00
Toshi MARUYAMA 7120496629 add missing fixtures at unit attachment test
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7909 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-11-24 05:51:39 +00:00
Toshi MARUYAMA 564321b2d5 move logic to use latest image file attachment to class method for common use (#3261)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7908 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-11-24 05:31:29 +00:00
Toshi MARUYAMA b8b2c1cce4 use temporary attachments directory in unit attachment test
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7892 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-11-23 14:42:32 +00:00
Toshi MARUYAMA f28500f1ac add test to destroy at unit attachment test.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6762 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-08-30 05:07:31 +00:00
Toshi MARUYAMA e667cab364 remove trailing white-spaces from test/unit/attachment_test.rb.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6705 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-08-29 00:04:31 +00:00
Jean-Philippe Lang 6db66f7183 Fixed: file uploads broken by r6312 (#8912).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6320 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-07-29 15:28:59 +00:00
Toshi MARUYAMA b2670f4650 remove trailing white-spaces from unit attachment test.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5844 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-05-18 07:53:50 +00:00
Jean-Philippe Lang 92d34234b0 Safer assertion.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4598 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-12-31 15:24:42 +00:00
Jean-Baptiste Barth 17f86d964f Use absolute paths in test/**/* requires for Ruby 1.9.2 compatibility. #4050
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4509 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-12-12 23:24:34 +00:00
Eric Davis cf334cee31 Refactor: extract test method
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3773 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-06-19 03:54:23 +00:00
Eric Davis c56c0f411c Fix a nil error when a Project cannot save attachments.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3772 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-06-19 03:54:17 +00:00
Jean-Philippe Lang 241f79ac06 Fixed: attachments with the same name at the same time overwrite (#3691).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3511 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-02-28 11:12:40 +00:00
Jean-Philippe Lang ff7eb7b23a Auto-detect attachment content type when blank (#3782).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3258 e93f8b46-1217-0410-a6f0-8f06a7374b81
2009-12-29 13:28:30 +00:00
Jean-Philippe Lang 38dc4d1cf9 Sets file encoding to utf-8 for ruby 1.9.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2910 e93f8b46-1217-0410-a6f0-8f06a7374b81
2009-10-10 15:00:28 +00:00
Jean-Philippe Lang ac8a67191f Renames uploaded_test_file helper.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2909 e93f8b46-1217-0410-a6f0-8f06a7374b81
2009-10-10 14:56:29 +00:00
Eric Davis 7b0cb6aba8 Upgraded to Rails 2.3.4 (#3597)
* Ran the Rails upgrade
* Upgraded to Rails Engines 2.3.2
* Added a plugin to let Engines override application views.
* Converted tests to use the new classes:
** ActionController::TestCase for functional
** ActiveSupport::TestCase for units
* Converted ActiveRecord::Error message to a string.
* ActiveRecord grouping returns an ordered hash which doesn't have #sort!
* Updated the I18n storage_units format.
* Added some default initializers from a fresh rails app
* Changed the order of check_box_tags and hidden_field_tags.  The hidden tag
  needs to appear first in Rails 2.3, otherwise it will override any value in
  the check_box_tag.
* Removed the custom handler for when the cookie store is tampered with.
  Rails 2.3 removed the TamperedWithCookie exception and instead Rails will not
  load the data from it when it's been tampered with (e.g. no user login).
* Fixed mail layouts, 2.3 has problems with implicit multipart emails that
  use layouts.  Also removed some custom Redmine mailer code.
* Fixed a bug that occurred in tests where the "required" span tag would be
  added to the :field_status translation.  This resulted in an email string of:

    <li>Status<span class="required"> *</span><span class="required"> *</span>

  Instead of:

    <li>Status: New</li>

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2887 e93f8b46-1217-0410-a6f0-8f06a7374b81
2009-09-13 17:14:35 +00:00
Jean-Philippe Lang a59854ef9d Fixes memory consumption on file upload (#3116).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2670 e93f8b46-1217-0410-a6f0-8f06a7374b81
2009-04-10 16:37:42 +00:00
Jean-Philippe Lang 93c04f2666 Fixed: wrong digest for text files under Windows (#2264).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2085 e93f8b46-1217-0410-a6f0-8f06a7374b81
2008-12-02 17:57:13 +00:00
Jean-Philippe Lang 439c697237 Fixed: possible error when attachment's filename is non-ASCII (#747, #1243, #1089).
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1433 e93f8b46-1217-0410-a6f0-8f06a7374b81
2008-05-17 11:03:43 +00:00