summaryrefslogtreecommitdiffstats
path: root/test/unit/wiki_page_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2011-03-12 18:09:46 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2011-03-12 18:09:46 +0000
commitb8b35ab05f70e6edd524397d2fb0dca3630fa840 (patch)
tree47b6925e19f643969a019a5ca094f4a197777bad /test/unit/wiki_page_test.rb
parentf7127e9466861af2a8ea11624e619e6567890a36 (diff)
downloadredmine-b8b35ab05f70e6edd524397d2fb0dca3630fa840.tar.gz
redmine-b8b35ab05f70e6edd524397d2fb0dca3630fa840.zip
Moved wiki page updated_on eager load to a scope and fixed timestamp titles on wiki page index (#7818).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5098 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/wiki_page_test.rb')
-rw-r--r--test/unit/wiki_page_test.rb11
1 files changed, 9 insertions, 2 deletions
diff --git a/test/unit/wiki_page_test.rb b/test/unit/wiki_page_test.rb
index 20c6d383e..14c7ee6a8 100644
--- a/test/unit/wiki_page_test.rb
+++ b/test/unit/wiki_page_test.rb
@@ -1,5 +1,5 @@
-# redMine - project management software
-# Copyright (C) 2006-2007 Jean-Philippe Lang
+# Redmine - project management software
+# Copyright (C) 2006-2011 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
@@ -121,4 +121,11 @@ class WikiPageTest < ActiveSupport::TestCase
assert_nil child.parent_id
end
end
+
+ def test_updated_on_eager_load
+ page = WikiPage.with_updated_on.first
+ assert page.is_a?(WikiPage)
+ assert_not_nil page.read_attribute(:updated_on)
+ assert_equal page.content.updated_on, page.updated_on
+ end
end