diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-03-16 05:50:06 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-03-16 05:50:06 +0000 |
commit | 7ffdd961e9f92a2f1eb86f1d38ce056e1507e2b3 (patch) | |
tree | 7656d6d0c09ff826c669b8eebfc095c70abfcda4 /test/unit/repository_bazaar_test.rb | |
parent | 16b02fcfada66ab34b049e33e6e870f04440aa48 (diff) | |
download | redmine-7ffdd961e9f92a2f1eb86f1d38ce056e1507e2b3.tar.gz redmine-7ffdd961e9f92a2f1eb86f1d38ce056e1507e2b3.zip |
scm: bazaar: add changesets order test in unit model test.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5148 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/repository_bazaar_test.rb')
-rw-r--r-- | test/unit/repository_bazaar_test.rb | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/test/unit/repository_bazaar_test.rb b/test/unit/repository_bazaar_test.rb index b2515fe30..038db8f23 100644 --- a/test/unit/repository_bazaar_test.rb +++ b/test/unit/repository_bazaar_test.rb @@ -71,6 +71,34 @@ class RepositoryBazaarTest < ActiveSupport::TestCase assert_equal 'file', entries.last.kind assert_equal 'edit.png', entries.last.name 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('4') + assert_nil changeset.next + end else puts "Bazaar test repository NOT FOUND. Skipping unit tests !!!" def test_fake; assert true end |