From e641f69589242d602f7274e986acdd26ad1d53ea Mon Sep 17 00:00:00 2001 From: rick Date: Fri, 31 Dec 2010 12:25:18 -0600 Subject: [PATCH] add test for BlobEntry.normalize_dir --- test/test_page.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/test_page.rb b/test/test_page.rb index e7e5f8c5..1d9bdbbc 100644 --- a/test/test_page.rb +++ b/test/test_page.rb @@ -134,4 +134,12 @@ context "Page" do assert_equal '', Gollum::Page.cname(nil) assert_equal '', Gollum::Page.cname(3) end + + test "normalize_dir" do + assert_equal "", Gollum::BlobEntry.normalize_dir("") + assert_equal "", Gollum::BlobEntry.normalize_dir(".") + assert_equal "", Gollum::BlobEntry.normalize_dir("/") + assert_equal "/foo", Gollum::BlobEntry.normalize_dir("foo") + assert_equal "/foo", Gollum::BlobEntry.normalize_dir("/foo") + end end \ No newline at end of file