summaryrefslogtreecommitdiffstats
path: root/test/unit/attachment_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Attachment preview does not work for some source files such as JavaScript ↵Go MAEDA2019-05-041-0/+17
| | | | | | | | | and Go (#29259). Patch by Go MAEDA with the help of Stephan Wenzel's contribution. git-svn-id: http://svn.redmine.org/redmine/trunk@18122 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Support frozen_string_literal in test/**/*.rb (#26561).Go MAEDA2019-03-211-1/+1
| | | | | | | Contributed by Pavel Rosický. git-svn-id: http://svn.redmine.org/redmine/trunk@17996 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Decode hexadecimal-encoded literals in order to be frozen string literals ↵Go MAEDA2019-03-191-1/+1
| | | | | | | | | friendly (#31004). Patch by Yuichi HARADA. git-svn-id: http://svn.redmine.org/redmine/trunk@17991 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Remove unnecessary encoding magic comment (#31034).Go MAEDA2019-03-161-2/+0
| | | | | | | | | The default script encoding is UTF-8 in Ruby 2.0 or later. Patch by Go MAEDA. git-svn-id: http://svn.redmine.org/redmine/trunk@17976 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Add "frozen_string_literal: false" for all files (#26561).Go MAEDA2019-03-151-0/+2
| | | | | | | This will be changed to true in the future. git-svn-id: http://svn.redmine.org/redmine/trunk@17947 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Makes sure the generated thumbnail is always of at least the requested size ↵Go MAEDA2019-02-051-0/+18
| | | | | | | | | (#13688). Patch by Jens Krämer and Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@17850 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Clear thumbnails directory to prevent test failure.Jean-Philippe Lang2018-12-161-0/+2
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@17752 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Deletes thumbnails when the attachment diskfile is deleted (#30177).Go MAEDA2018-12-151-0/+15
| | | | | | | Patch by Jens Krämer. git-svn-id: http://svn.redmine.org/redmine/trunk@17736 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Allows re-use of thumbnails for identical attachments (#30177).Go MAEDA2018-12-151-1/+23
| | | | | | | Patch by Jens Krämer. git-svn-id: http://svn.redmine.org/redmine/trunk@17735 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Test failure.Jean-Philippe Lang2018-12-131-0/+1
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@17729 e93f8b46-1217-0410-a6f0-8f06a7374b81
* "thumbnail" macro may break filename attribute of the attachment (#29038).Go MAEDA2018-07-021-0/+1
| | | | | | | Patch by Toru Takahashi. git-svn-id: http://svn.redmine.org/redmine/trunk@17428 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Merged rails-5.1 branch (#23630).Jean-Philippe Lang2017-07-231-4/+0
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@16859 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Update copyright.Jean-Philippe Lang2017-06-251-1/+1
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@16685 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Adds a test for when the file comparison fails (#25215).Jean-Philippe Lang2017-04-031-0/+9
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@16462 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Cleanup tests with mock files.Jean-Philippe Lang2017-04-031-20/+15
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@16461 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Reuse existing identical disk files for new attachments (#25215).Jean-Philippe Lang2017-04-031-2/+6
| | | | | | Patch by Jens Kraemer. git-svn-id: http://svn.redmine.org/redmine/trunk@16458 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Adds a rake task to update attachments digests to SHA256 (#25240).Jean-Philippe Lang2017-04-031-0/+9
| | | | | | Patch by Jens Krämer. git-svn-id: http://svn.redmine.org/redmine/trunk@16455 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Changes the digest used for attachments to SHA256 (#25240).Jean-Philippe Lang2017-04-031-2/+2
| | | | | | Patch by Jens Kraemer. git-svn-id: http://svn.redmine.org/redmine/trunk@16454 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Test cleanup.Jean-Philippe Lang2016-12-161-1/+0
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@16086 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Test cleanup.Jean-Philippe Lang2016-12-161-2/+2
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@16085 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Fixed the assertion (#24186).Jean-Philippe Lang2016-12-161-1/+1
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@16084 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Restrict the length attachment filenames on disk (#24186).Jean-Philippe Lang2016-12-161-0/+13
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@16083 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Updates copyright for 2016.Jean-Philippe Lang2016-03-131-1/+1
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@15238 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Removes attachment from disk after rollback on create (#21125).Jean-Philippe Lang2016-01-211-1/+1
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@15085 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Files upload restriction by files extensions (#20008).Jean-Philippe Lang2015-11-011-0/+39
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@14792 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Extend Filesize in the attachments table for files with size > 2GB (#10672).Jean-Philippe Lang2015-10-201-0/+11
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@14709 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Remove attachment after transaction commit (#20388).Jean-Philippe Lang2015-09-301-0/+4
| | | | | | Patch by Ivan Zabrovskiy. git-svn-id: http://svn.redmine.org/redmine/trunk@14630 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Typo.Jean-Philippe Lang2015-09-301-1/+1
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@14629 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Wrong syntax for resizing inline images may throw a 500 error (#20278).Jean-Philippe Lang2015-08-021-0/+7
| | | | | | Fix by Go MAEDA. git-svn-id: http://svn.redmine.org/redmine/trunk@14473 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Copyright update.Jean-Philippe Lang2015-01-111-1/+1
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@13872 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Make sure that Redmine::Thumbnail.generate is called.Jean-Philippe Lang2014-12-051-1/+2
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@13714 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Adds some Attachment tests.Jean-Philippe Lang2014-12-051-0/+22
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@13709 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Edit attachments after upload (#1326).Jean-Philippe Lang2014-11-291-0/+39
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@13665 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Blank content type for attachments attached via Ajax file upload (Patch by ↵Jean-Philippe Lang2014-05-021-0/+9
| | | | | | Jens Krämer). git-svn-id: http://svn.redmine.org/redmine/trunk@13125 e93f8b46-1217-0410-a6f0-8f06a7374b81
* update copyright year (#15977)Toshi MARUYAMA2014-01-291-1/+1
| | | | | | Contributed by Daniel Felix. git-svn-id: http://svn.redmine.org/redmine/trunk@12736 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Rails4: replace deprecated Relation#first with finder options at AttachmentTestToshi MARUYAMA2014-01-081-2/+1
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@12500 e93f8b46-1217-0410-a6f0-8f06a7374b81
* remove trailing white-spaces from test/unit/attachment_test.rbToshi MARUYAMA2013-12-041-4/+4
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@12356 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Strip eols from file names (#14819).Jean-Philippe Lang2013-09-111-0/+7
| | | | git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@12128 e93f8b46-1217-0410-a6f0-8f06a7374b81
* not use assert_not_nil in Errors#[]Toshi MARUYAMA2013-07-301-1/+1
| | | | | | | | 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
* Removing shoulda context.Jean-Philippe Lang2013-02-031-34/+32
| | | | git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11315 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Copyright for 2013 (#12788).Jean-Philippe Lang2013-01-121-1/+1
| | | | | | Patch by Daniel Felix. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11169 e93f8b46-1217-0410-a6f0-8f06a7374b81
* NoMethodError: private method `now' called for DateTime:Class error in tests ↵Jean-Philippe Lang2012-12-131-3/+0
| | | | | | with ruby < 1.9.3 (#5298). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10993 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Store attachments in subdirectories (#5298).Jean-Philippe Lang2012-12-131-0/+33
| | | | | | 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
* Adds Attachment#title.Jean-Philippe Lang2012-07-161-0/+8
| | | | git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10012 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Validate attachment description length (#11365).Jean-Philippe Lang2012-07-151-0/+6
| | | | git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9984 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Displays thumbnails of attached images of the issue view (#1006).Jean-Philippe Lang2012-07-071-0/+24
| | | | | | 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
* Copyright update.Jean-Philippe Lang2012-05-051-1/+1
| | | | git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9636 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Use fixture.Jean-Philippe Lang2012-02-241-1/+1
| | | | git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8983 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Adds a rake test that removes old unattached uploads (#10253).Jean-Philippe Lang2012-02-161-0/+10
| | | | git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8893 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Better handling of attachments when issue validation fails (#10253).Jean-Philippe Lang2012-02-161-0/+4
| | | | git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8891 e93f8b46-1217-0410-a6f0-8f06a7374b81