diff options
author | Go MAEDA <maeda@farend.jp> | 2019-03-26 14:39:58 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2019-03-26 14:39:58 +0000 |
commit | 1d6258250ccfadb3213a300db63afaeb9ef38441 (patch) | |
tree | 7de20e804b60e554235c98f9f99ac9306769f563 /test | |
parent | f3232146acbc867491fc992cadbea8bddb057d1e (diff) | |
download | redmine-1d6258250ccfadb3213a300db63afaeb9ef38441.tar.gz redmine-1d6258250ccfadb3213a300db63afaeb9ef38441.zip |
Merged r18008 from trunk to 4.0-stable (#31087).
git-svn-id: http://svn.redmine.org/redmine/branches/4.0-stable@18009 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/version_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/unit/version_test.rb b/test/unit/version_test.rb index b05096067..e3e52b33d 100644 --- a/test/unit/version_test.rb +++ b/test/unit/version_test.rb @@ -278,6 +278,13 @@ class VersionTest < ActiveSupport::TestCase assert_equal false, version.deletable? end + def test_deletable_should_return_false_when_referenced_by_an_attachment + version = Version.generate! + Attachment.generate!(:container => version, :filename => 'test.txt') + + assert_equal false, version.deletable? + end + def test_like_scope version = Version.create!(:project => Project.find(1), :name => 'Version for like scope test') |