From 852a0e63d294de874c3311f5e7edf40e2f2ecd60 Mon Sep 17 00:00:00 2001 From: scott Chacon Date: Mon, 12 Nov 2007 17:29:39 -0800 Subject: added a bunch of good stuff to the commit object --- tests/units/test_lib.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tests/units/test_lib.rb') diff --git a/tests/units/test_lib.rb b/tests/units/test_lib.rb index 5fbd896..5afb4ec 100644 --- a/tests/units/test_lib.rb +++ b/tests/units/test_lib.rb @@ -13,6 +13,14 @@ class TestLib < Test::Unit::TestCase set_file_paths @lib = Git.open(@wdir).lib end + + def test_commit_data + data = @lib.commit_data('1cc8667014381') + assert_equal('scott Chacon 1194561188 -0800', data['author']) + assert_equal('94c827875e2cadb8bc8d4cdd900f19aa9e8634c7', data['tree']) + assert_equal("test\n", data['message']) + assert_equal(["546bec6f8872efa41d5d97a369f669165ecda0de"], data['parent']) + end # takes parameters, returns array of appropriate commit objects # :count -- cgit