summaryrefslogtreecommitdiffstats
path: root/test/unit/attachment_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Use `fixtures :all` to ensure consistent test data and improve test ↵Go MAEDA2024-12-111-3/+0
| | | | | | | | | reliability (#41961). Patch by Katsuya HIDAKA (user:hidakatsuya). git-svn-id: https://svn.redmine.org/redmine/trunk@23391 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Fix RuboCop offense Rails/PluralizationGrammar (#39889).Go MAEDA2024-08-251-3/+3
| | | | git-svn-id: https://svn.redmine.org/redmine/trunk@22985 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Fix RuboCop offense Layout/SpaceAfterComma, one of the offenses enabled in ↵Go MAEDA2024-08-121-1/+1
| | | | | | rubocop-rails-omakase (#39887). git-svn-id: https://svn.redmine.org/redmine/trunk@22953 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Fix RuboCop offense Layout/EmptyLinesAroundMethodBody, one of the offenses ↵Go MAEDA2024-08-121-1/+0
| | | | | | enabled in rubocop-rails-omakase (#39887). git-svn-id: https://svn.redmine.org/redmine/trunk@22950 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Add timeout for thumbnail generation process (#37530).Go MAEDA2024-05-271-0/+19
| | | | | | | Patch by Go MAEDA (@maeda). git-svn-id: https://svn.redmine.org/redmine/trunk@22847 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Remove current year from source file copyright headers and update year in ↵Marius Balteanu2024-02-261-1/+1
| | | | | | footer to 2024 (#40043). git-svn-id: https://svn.redmine.org/redmine/trunk@22746 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Support for WebP images (#38168).Go MAEDA2023-01-161-0/+1
| | | | | | | | | | | * Inline image * Thumbnail * Inserting markup for an image uploaded by drag and drop Patch by Go MAEDA. git-svn-id: https://svn.redmine.org/redmine/trunk@22045 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Use `require_relative` instead of `require File.expand_path(..., __FILE__)` ↵Go MAEDA2023-01-011-1/+1
| | | | | | | | | (#38093). Patch by Go MAEDA. git-svn-id: https://svn.redmine.org/redmine/trunk@22016 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Update copyright year to 2023 (#38141).Go MAEDA2023-01-011-1/+1
| | | | git-svn-id: https://svn.redmine.org/redmine/trunk@22013 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Update copyright year in source files to 2022 (#36379).Go MAEDA2022-01-021-1/+1
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@21342 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Use File.exist? instead of deprecated File.exists? (#36358).Go MAEDA2021-12-271-4/+4
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@21327 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Fixes for Style/FileWrite offense introduced in RuboCop 1.24.0 (#35136).Go MAEDA2021-12-241-3/+1
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@21322 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Don't unlink files before closing them (#35539, #35721).Go MAEDA2021-08-181-4/+8
| | | | | | | Patch by Pavel Rosický. git-svn-id: http://svn.redmine.org/redmine/trunk@21194 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Ensure unique attachment filenames (#35539).Go MAEDA2021-07-191-6/+22
| | | | | | | Patch by Jens Krämer. git-svn-id: http://svn.redmine.org/redmine/trunk@21071 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Validate attachment filenames on every change (#34367).Go MAEDA2021-04-161-0/+13
| | | | | | | Patch by Holger Just. git-svn-id: http://svn.redmine.org/redmine/trunk@20946 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Update copyright year in source files to 2021 (#33069).Go MAEDA2021-03-251-1/+1
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@20846 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Case-insensitive matching fails for Unicode filenames when referring to ↵Go MAEDA2021-03-201-0/+13
| | | | | | | | | attachments in text formatting (#27780). Patch by Go MAEDA. git-svn-id: http://svn.redmine.org/redmine/trunk@20835 e93f8b46-1217-0410-a6f0-8f06a7374b81
* fix source indent of AttachmentTestToshi MARUYAMA2020-10-271-17/+26
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@20209 e93f8b46-1217-0410-a6f0-8f06a7374b81
* When creating more than two identical attachments in a single transaction, ↵Go MAEDA2020-09-281-0/+17
| | | | | | | | | the first one always ends up unreadable (#33769). Patch by Jens Krämer. git-svn-id: http://svn.redmine.org/redmine/trunk@20094 e93f8b46-1217-0410-a6f0-8f06a7374b81
* remove spaces inside {} of test/unit/attachment_test.rbToshi MARUYAMA2020-07-191-1/+1
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@19915 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Fix that bulk download raises Errno::EACCES on Windows (#7056).Go MAEDA2020-04-111-11/+15
| | | | | | | Patch by Yuichi HARADA. git-svn-id: http://svn.redmine.org/redmine/trunk@19688 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Skip thumbnail tests if ImageMagick convert command is not available (#33226).Go MAEDA2020-04-021-0/+1
| | | | | | | Patch by Pavel Rosický. git-svn-id: http://svn.redmine.org/redmine/trunk@19640 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Download all attachments at once (#7056).Go MAEDA2020-03-211-0/+26
| | | | | | | Patch by Mizuki ISHIKAWA. git-svn-id: http://svn.redmine.org/redmine/trunk@19601 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Update copyright year in source files to 2020 (#33069).Go MAEDA2020-03-031-1/+1
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@19553 e93f8b46-1217-0410-a6f0-8f06a7374b81
* cleanup: rubocop: fix Layout/AlignArguments in test/unit/attachment_test.rbToshi MARUYAMA2019-11-091-3/+5
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@19035 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Don't try to generate thumbnails if convert command is not available (#32289).Go MAEDA2019-10-311-1/+6
| | | | | | | Patch by Go MAEDA. git-svn-id: http://svn.redmine.org/redmine/trunk@18885 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Fix test failure due to missing call to set_tmp_attachments_directory (#32122).Go MAEDA2019-10-041-1/+9
| | | | | | | Patch by Yuichi HARADA. git-svn-id: http://svn.redmine.org/redmine/trunk@18593 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Update copyright year.Go MAEDA2019-05-251-1/+1
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@18198 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Test for r18158 (#22481).Go MAEDA2019-05-121-5/+16
| | | | | | | Patch by Go MAEDA. git-svn-id: http://svn.redmine.org/redmine/trunk@18159 e93f8b46-1217-0410-a6f0-8f06a7374b81
* 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