diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-12-01 17:15:42 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-12-01 17:15:42 +0000 |
commit | db002edabdec9050e6d512ae8759783894b9624a (patch) | |
tree | a7f455c3b01a3c59380808b44ffb8b0d767acf82 /test/unit/changeset_test.rb | |
parent | 3baf086e2d8e5d969ce12217e1e143e5b4ec971a (diff) | |
download | redmine-db002edabdec9050e6d512ae8759783894b9624a.tar.gz redmine-db002edabdec9050e6d512ae8759783894b9624a.zip |
* Added links to previous and next revisions on revision view (patch by Cyril Mougel slightly edited)
* Fixed TimelogController#report december error
* Fixed ProjectsControllerTest#test_activity 1st and 2nd day of the month failure
git-svn-id: http://redmine.rubyforge.org/svn/trunk@938 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/changeset_test.rb')
-rw-r--r-- | test/unit/changeset_test.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/unit/changeset_test.rb b/test/unit/changeset_test.rb index ee53f18ff..2442a8b8c 100644 --- a/test/unit/changeset_test.rb +++ b/test/unit/changeset_test.rb @@ -39,4 +39,24 @@ class ChangesetTest < Test::Unit::TestCase assert fixed.closed? assert_equal 90, fixed.done_ratio end + + def test_previous + changeset = Changeset.find_by_revision(3) + assert_equal Changeset.find_by_revision(2), changeset.previous + end + + def test_previous_nil + changeset = Changeset.find_by_revision(1) + assert_nil changeset.previous + end + + def test_next + changeset = Changeset.find_by_revision(2) + assert_equal Changeset.find_by_revision(3), changeset.next + end + + def test_next_nil + changeset = Changeset.find_by_revision(4) + assert_nil changeset.next + end end |