diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-03-02 07:10:39 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-03-02 07:10:39 +0000 |
commit | 0220e7db3b5c2b66bc3ccaa29aa9b725551973bb (patch) | |
tree | ca76702a5c113339b1a35a0dc5604286e3d9e776 /test | |
parent | b59becdfbcc184dd1c34391caa3a48f19bab1277 (diff) | |
download | redmine-0220e7db3b5c2b66bc3ccaa29aa9b725551973bb.tar.gz redmine-0220e7db3b5c2b66bc3ccaa29aa9b725551973bb.zip |
scm: subversion: add changesets order test in unit model test (#5357).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4987 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/repository_subversion_test.rb | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/test/unit/repository_subversion_test.rb b/test/unit/repository_subversion_test.rb index 158f17c55..c111956a9 100644 --- a/test/unit/repository_subversion_test.rb +++ b/test/unit/repository_subversion_test.rb @@ -159,6 +159,34 @@ class RepositorySubversionTest < ActiveSupport::TestCase assert_equal s2, c.comments end end + + def test_previous + @repository.fetch_changesets + @repository.reload + changeset = @repository.find_changeset_by_name('3') + assert_equal @repository.find_changeset_by_name('2'), changeset.previous + end + + def test_previous_nil + @repository.fetch_changesets + @repository.reload + changeset = @repository.find_changeset_by_name('1') + assert_nil changeset.previous + end + + def test_next + @repository.fetch_changesets + @repository.reload + changeset = @repository.find_changeset_by_name('2') + assert_equal @repository.find_changeset_by_name('3'), changeset.next + end + + def test_next_nil + @repository.fetch_changesets + @repository.reload + changeset = @repository.find_changeset_by_name('11') + assert_nil changeset.next + end else puts "Subversion test repository NOT FOUND. Skipping unit tests !!!" def test_fake; assert true end |