diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2011-11-28 20:12:03 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2011-11-28 20:12:03 +0000 |
commit | b8a924e4e1cb6e73299b8e13b5ee8ec625cda2b7 (patch) | |
tree | d96a7548ca164cd6d0ceb190a013c853be921ef3 /test/unit/wiki_content_test.rb | |
parent | 744e4357a00780583df556b9d4b5cfb0ad6517dc (diff) | |
download | redmine-b8a924e4e1cb6e73299b8e13b5ee8ec625cda2b7.tar.gz redmine-b8a924e4e1cb6e73299b8e13b5ee8ec625cda2b7.zip |
Adds #current_version? method to wiki content.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7972 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/wiki_content_test.rb')
-rw-r--r-- | test/unit/wiki_content_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/unit/wiki_content_test.rb b/test/unit/wiki_content_test.rb index 97c6b8ade..4900f48e2 100644 --- a/test/unit/wiki_content_test.rb +++ b/test/unit/wiki_content_test.rb @@ -85,4 +85,11 @@ class WikiContentTest < ActiveSupport::TestCase page.reload assert_equal 500.kilobyte, page.content.text.size end + + def test_current_version + content = WikiContent.find(11) + assert_equal true, content.current_version? + assert_equal true, content.versions.first(:order => 'version DESC').current_version? + assert_equal false, content.versions.first(:order => 'version ASC').current_version? + end end |