mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-14 17:35:50 +01:00
Fix Test
This commit is contained in:
@@ -16,7 +16,7 @@ trait ServiceSpecBase {
|
|||||||
val (url, user, pass) = (DatabaseConfig.url(Some(dir.toString)), DatabaseConfig.user, DatabaseConfig.password)
|
val (url, user, pass) = (DatabaseConfig.url(Some(dir.toString)), DatabaseConfig.user, DatabaseConfig.password)
|
||||||
org.h2.Driver.load()
|
org.h2.Driver.load()
|
||||||
using(DriverManager.getConnection(url, user, pass)){ conn =>
|
using(DriverManager.getConnection(url, user, pass)){ conn =>
|
||||||
servlet.AutoUpdate.versions.reverse.foreach(_.update(conn))
|
servlet.AutoUpdate.versions.reverse.foreach(_.update(conn, Thread.currentThread.getContextClassLoader))
|
||||||
}
|
}
|
||||||
Database.forURL(url, user, pass).withSession { session =>
|
Database.forURL(url, user, pass).withSession { session =>
|
||||||
action(session)
|
action(session)
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import javax.servlet.ServletContext
|
|||||||
|
|
||||||
class GitCommandFactorySpec extends Specification with Mockito {
|
class GitCommandFactorySpec extends Specification with Mockito {
|
||||||
|
|
||||||
val factory = new GitCommandFactory(mock[ServletContext], "http://localhost:8080")
|
val factory = new GitCommandFactory("http://localhost:8080")
|
||||||
|
|
||||||
"createCommand" should {
|
"createCommand" should {
|
||||||
"returns GitReceivePack when command is git-receive-pack" in {
|
"returns GitReceivePack when command is git-receive-pack" in {
|
||||||
|
|||||||
Reference in New Issue
Block a user