From 4c835e61e8ea2d5af2acf0c85c3c1f0d06f419df Mon Sep 17 00:00:00 2001
From: James Moger <james.moger@gitblit.com>
Date: Wed, 26 Oct 2011 17:19:55 -0400
Subject: [PATCH] Documentation.
---
tests/com/gitblit/tests/JGitUtilsTest.java | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/tests/com/gitblit/tests/JGitUtilsTest.java b/tests/com/gitblit/tests/JGitUtilsTest.java
index 0841da3..0d7aa63 100644
--- a/tests/com/gitblit/tests/JGitUtilsTest.java
+++ b/tests/com/gitblit/tests/JGitUtilsTest.java
@@ -33,6 +33,7 @@
import org.eclipse.jgit.lib.RepositoryCache.FileKey;
import org.eclipse.jgit.revwalk.RevCommit;
import org.eclipse.jgit.util.FS;
+import org.eclipse.jgit.util.FileUtils;
import com.gitblit.GitBlit;
import com.gitblit.Keys;
@@ -197,6 +198,13 @@
.equals("183474d554e6f68478a02d9d7888b67a9338cdff"));
}
+ public void testCreateOrphanedBranch() throws Exception {
+ Repository repository = JGitUtils.createRepository(GitBlitSuite.REPOSITORIES, "orphantest");
+ assertTrue(JGitUtils.createOrphanBranch(repository,
+ "x" + Long.toHexString(System.currentTimeMillis()).toUpperCase()));
+ FileUtils.delete(repository.getDirectory(), FileUtils.RECURSIVE);
+ }
+
public void testStringContent() throws Exception {
Repository repository = GitBlitSuite.getHelloworldRepository();
String contentA = JGitUtils.getStringContent(repository, null, "java.java");
@@ -357,4 +365,5 @@
assertTrue(zipFileB.length() > 0);
zipFileB.delete();
}
+
}
\ No newline at end of file
--
Gitblit v1.9.1