summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2013-01-23 08:31:35 -0500
committerJames Moger <james.moger@gitblit.com>2013-01-23 08:31:35 -0500
commit94ef80069e978137edc74cb428d4d52cdedbae5c (patch)
tree078047d25ad8f020ab721b9347eeccd11be4bbe1 /tests
parent795b227ed376f6ea9a6e13952a79770f33766266 (diff)
parent55e2b299f0c2ee0b5350addc32522a7661f5f53a (diff)
downloadgitblit-94ef80069e978137edc74cb428d4d52cdedbae5c.tar.gz
gitblit-94ef80069e978137edc74cb428d4d52cdedbae5c.zip
Merge branch 'fogbugz' of https://github.com/djschny/gitblit
Diffstat (limited to 'tests')
-rw-r--r--tests/com/gitblit/tests/GroovyScriptTest.java23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/com/gitblit/tests/GroovyScriptTest.java b/tests/com/gitblit/tests/GroovyScriptTest.java
index 47d20a4c..2954fa1d 100644
--- a/tests/com/gitblit/tests/GroovyScriptTest.java
+++ b/tests/com/gitblit/tests/GroovyScriptTest.java
@@ -30,6 +30,7 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Date;
+import java.util.HashMap;
import java.util.List;
import java.util.concurrent.atomic.AtomicBoolean;
@@ -70,6 +71,28 @@ public class GroovyScriptTest {
}
@Test
+ public void testFogbugz() throws Exception {
+ MockGitblit gitblit = new MockGitblit();
+ MockLogger logger = new MockLogger();
+ MockClientLogger clientLogger = new MockClientLogger();
+ List<ReceiveCommand> commands = new ArrayList<ReceiveCommand>();
+ commands.add(new ReceiveCommand(ObjectId
+ .fromString("c18877690322dfc6ae3e37bb7f7085a24e94e887"), ObjectId
+ .fromString("3fa7c46d11b11d61f1cbadc6888be5d0eae21969"), "refs/heads/master"));
+ commands.add(new ReceiveCommand(ObjectId
+ .fromString("c18877690322dfc6ae3e37bb7f7085a24e94e887"), ObjectId
+ .fromString("3fa7c46d11b11d61f1cbadc6888be5d0eae21969"), "refs/heads/master2"));
+
+ RepositoryModel repository = GitBlit.self().getRepositoryModel("helloworld.git");
+ repository.customFields = new HashMap<String,String>();
+ repository.customFields.put( "fogbugzUrl", "http://bugs.test.com" );
+ repository.customFields.put( "fogbugzRepositoryId", "1" );
+ repository.customFields.put( "fogbugzCommitMessageRegex", "\\s*[Bb][Uu][Gg][(Zz)(Ss)]*\\s*[(IDs)]*\\s*[#:; ]+((\\d+[ ,:;#]*)+)" );
+
+ test("fogbugz.groovy", gitblit, logger, clientLogger, commands, repository);
+ }
+
+ @Test
public void testSendHtmlMail() throws Exception {
MockGitblit gitblit = new MockGitblit();
MockLogger logger = new MockLogger();