Redmine 4.1.1

This commit is contained in:
Manuel Cillero 2020-11-22 21:20:06 +01:00
parent 33e7b881a5
commit 3d976f1b3b
1593 changed files with 36180 additions and 19489 deletions

View file

@ -1,5 +1,7 @@
# frozen_string_literal: true
# Redmine - project management software
# Copyright (C) 2006-2017 Jean-Philippe Lang
# Copyright (C) 2006-2019 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@ -25,24 +27,24 @@ class WikiContentVersionTest < ActiveSupport::TestCase
end
def test_should_respond_to_attachments
v = WikiContent::Version.find(2)
v = WikiContentVersion.find(2)
assert v.respond_to?(:attachments)
end
def test_destroy
v = WikiContent::Version.find(2)
v = WikiContentVersion.find(2)
assert_difference 'WikiContent::Version.count', -1 do
assert_difference 'WikiContentVersion.count', -1 do
v.destroy
end
end
def test_destroy_last_version_should_revert_content
v = WikiContent::Version.find(3)
v = WikiContentVersion.find(3)
assert_no_difference 'WikiPage.count' do
assert_no_difference 'WikiContent.count' do
assert_difference 'WikiContent::Version.count', -1 do
assert_difference 'WikiContentVersion.count', -1 do
assert v.destroy
end
end
@ -58,13 +60,13 @@ class WikiContentVersionTest < ActiveSupport::TestCase
end
def test_destroy_all_versions_should_delete_page
WikiContent::Version.find(1).destroy
WikiContent::Version.find(2).destroy
v = WikiContent::Version.find(3)
WikiContentVersion.find(1).destroy
WikiContentVersion.find(2).destroy
v = WikiContentVersion.find(3)
assert_difference 'WikiPage.count', -1 do
assert_difference 'WikiContent.count', -1 do
assert_difference 'WikiContent::Version.count', -1 do
assert_difference 'WikiContentVersion.count', -1 do
assert v.destroy
end
end