mirror of
https://github.com/redmine/redmine.git
synced 2026-03-27 23:00:50 +01:00
Merged r15610 and r15611 (#23242).
git-svn-id: http://svn.redmine.org/redmine/branches/3.3-stable@15617 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -118,6 +118,10 @@ class WikiContent < ActiveRecord::Base
|
||||
page.project
|
||||
end
|
||||
|
||||
def attachments
|
||||
page.nil? ? [] : page.attachments
|
||||
end
|
||||
|
||||
# Return true if the content is the current page content
|
||||
def current_version?
|
||||
page.content.version == self.version
|
||||
|
||||
@@ -23,6 +23,11 @@ class WikiContentVersionTest < ActiveSupport::TestCase
|
||||
def setup
|
||||
end
|
||||
|
||||
def test_should_respond_to_attachments
|
||||
v = WikiContent::Version.find(2)
|
||||
assert v.respond_to?(:attachments)
|
||||
end
|
||||
|
||||
def test_destroy
|
||||
v = WikiContent::Version.find(2)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user