49: def test_changeset
50:
51:
52: repo = Repository::Repository.new @repo_dir
53:
54:
55: tree = repo.revision_tree
56: assert_not_nil tree
57:
58:
59: list = repo.list_changesets
60:
61:
62: list.each do |id|
63:
64: path, md = repo.find_changeset id
65: assert_not_nil path
66: assert_not_nil md
67: end
68:
69: list.each { |id| repo.find_parent_of(id) }
70: list.each { |id| repo.find_all_children(id) }
71: list.each { |id|
72: res = repo.build_readable_name(id)
73: assert_not_nil res, "Readable name is empty, should never happen"
74: }
75: list.each { |id|
76: prev_tree = repo.revision_tree
77: repo.delete_changeset id
78: assert_not_equal prev_tree, repo.revision_tree, "Tree didn't change"
79: }
80:
81:
82: list.each do |id|
83:
84: path, md = repo.find_changeset id
85:
86: assert_equal path, nil
87: assert_equal md, nil
88: end
89:
90:
91: list = repo.list_changesets
92: assert_equal list.length, 0, "There should be no changesets left"
93: end