Commit 2fe24891 authored by Toshi MARUYAMA's avatar Toshi MARUYAMA Committed by Eric Davis

scm: mercurial: move entries unit test from app to lib.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4863 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 9d9c0716
......@@ -133,6 +133,10 @@ begin
# TODO filesize etc.
def test_entries
assert_nil @adapter.entries(nil, '100000')
assert_equal 1, @adapter.entries("sources", 3).size
assert_equal 1, @adapter.entries("sources", 'b3a615152df8').size
[2, '400bb8672109', '400', 400].each do |r|
entries1 = @adapter.entries(nil, r)
assert entries1
......@@ -156,6 +160,12 @@ begin
end
end
def test_locate_on_outdated_repository
assert_equal 1, @adapter.entries("images", 0).size
assert_equal 2, @adapter.entries("images").size
assert_equal 2, @adapter.entries("images", 2).size
end
def test_access_by_nodeid
path = 'sources/welcome_controller.rb'
assert_equal @adapter.cat(path, 2), @adapter.cat(path, '400bb8672109')
......
......@@ -50,19 +50,6 @@ class RepositoryMercurialTest < ActiveSupport::TestCase
assert_equal 17, @repository.changesets.count
end
def test_entries
assert_equal 2, @repository.entries("sources", 2).size
assert_equal 2, @repository.entries("sources", '400bb8672109').size
assert_equal 1, @repository.entries("sources", 3).size
assert_equal 1, @repository.entries("sources", 'b3a615152df8').size
end
def test_locate_on_outdated_repository
assert_equal 1, @repository.entries("images", 0).size
assert_equal 2, @repository.entries("images").size
assert_equal 2, @repository.entries("images", 2).size
end
def test_isodatesec
# Template keyword 'isodatesec' supported in Mercurial 1.0 and higher
if @repository.scm.class.client_version_above?([1, 0])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment