##// END OF EJS Templates
Merged r15610 and r15611 (#23242)....
Jean-Philippe Lang -
r15235:0804245614bb
parent child
Show More
@@ -118,6 +118,10 class WikiContent < ActiveRecord::Base
118 118 page.project
119 119 end
120 120
121 def attachments
122 page.nil? ? [] : page.attachments
123 end
124
121 125 # Return true if the content is the current page content
122 126 def current_version?
123 127 page.content.version == self.version
@@ -23,6 +23,11 class WikiContentVersionTest < ActiveSupport::TestCase
23 23 def setup
24 24 end
25 25
26 def test_should_respond_to_attachments
27 v = WikiContent::Version.find(2)
28 assert v.respond_to?(:attachments)
29 end
30
26 31 def test_destroy
27 32 v = WikiContent::Version.find(2)
28 33
General Comments 0
You need to be logged in to leave comments. Login now