From 7427ddd900db312d88a43ba4a94ebaefd4aa6f58 Mon Sep 17 00:00:00 2001 From: Randy Merrill Date: Thu, 27 Jan 2011 13:00:54 -0800 Subject: [PATCH] Adding some tests to test that the commiter can retrieve parents that are not the same as the wiki ref. Also testing that the default wiki ref works without passing a ref. --- test/test_committer.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/test_committer.rb b/test/test_committer.rb index 68157844..bbfc4617 100644 --- a/test/test_committer.rb +++ b/test/test_committer.rb @@ -47,4 +47,16 @@ context "Wiki" do FileUtils.rm_rf(@path) end end + + test "parents with default wiki ref" do + ref = 'a8ad3c09dd842a3517085bfadd37718856dee813' + committer = Gollum::Committer.new(@wiki) + assert_equal ref, committer.parents.first.sha + end + + test "parents with custom ref" do + ref = '60f12f4254f58801b9ee7db7bca5fa8aeefaa56b' + committer = Gollum::Committer.new(@wiki) + assert_equal ref, committer.parents(ref).first.sha + end end \ No newline at end of file