mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-10 07:25:50 +01:00
Change package name
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
package service
|
||||
package gitbucket.core.service
|
||||
|
||||
import gitbucket.core.model.GroupMember
|
||||
import org.specs2.mutable.Specification
|
||||
import java.util.Date
|
||||
import model.GroupMember
|
||||
|
||||
class AccountServiceSpec extends Specification with ServiceSpecBase {
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
package service
|
||||
package gitbucket.core.service
|
||||
|
||||
import model.Profile._
|
||||
import gitbucket.core.model.Profile
|
||||
import gitbucket.core.servlet.AutoUpdate
|
||||
import gitbucket.core.util.{ControlUtil, DatabaseConfig, FileUtil}
|
||||
import profile.simple._
|
||||
import util.ControlUtil._
|
||||
import util.DatabaseConfig
|
||||
import ControlUtil._
|
||||
import java.sql.DriverManager
|
||||
import org.apache.commons.io.FileUtils
|
||||
import scala.util.Random
|
||||
@@ -12,11 +13,11 @@ import java.io.File
|
||||
trait ServiceSpecBase {
|
||||
|
||||
def withTestDB[A](action: (Session) => A): A = {
|
||||
util.FileUtil.withTmpDir(new File(FileUtils.getTempDirectory(), Random.alphanumeric.take(10).mkString)){ dir =>
|
||||
FileUtil.withTmpDir(new File(FileUtils.getTempDirectory(), Random.alphanumeric.take(10).mkString)){ dir =>
|
||||
val (url, user, pass) = (DatabaseConfig.url(Some(dir.toString)), DatabaseConfig.user, DatabaseConfig.password)
|
||||
org.h2.Driver.load()
|
||||
using(DriverManager.getConnection(url, user, pass)){ conn =>
|
||||
servlet.AutoUpdate.versions.reverse.foreach(_.update(conn, Thread.currentThread.getContextClassLoader))
|
||||
AutoUpdate.versions.reverse.foreach(_.update(conn, Thread.currentThread.getContextClassLoader))
|
||||
}
|
||||
Database.forURL(url, user, pass).withSession { session =>
|
||||
action(session)
|
||||
@@ -1,4 +1,4 @@
|
||||
package ssh
|
||||
package gitbucket.core.ssh
|
||||
|
||||
import org.specs2.mutable._
|
||||
import org.specs2.mock.Mockito
|
||||
@@ -1,4 +1,4 @@
|
||||
package util
|
||||
package gitbucket.core.util
|
||||
|
||||
import org.specs2.mutable._
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package util
|
||||
package gitbucket.core.util
|
||||
|
||||
import org.specs2.mutable._
|
||||
import org.scalatra.i18n.Messages
|
||||
@@ -2,11 +2,12 @@ package view
|
||||
|
||||
import java.util.Date
|
||||
|
||||
import gitbucket.core.model.Account
|
||||
import gitbucket.core.service.{SystemSettingsService, RequestCache}
|
||||
import gitbucket.core.view.AvatarImageProvider
|
||||
import org.specs2.mutable._
|
||||
import org.specs2.mock.Mockito
|
||||
import service.RequestCache
|
||||
import model.Account
|
||||
import service.SystemSettingsService.SystemSettings
|
||||
import SystemSettingsService.SystemSettings
|
||||
import play.twirl.api.Html
|
||||
import javax.servlet.http.HttpServletRequest
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package view
|
||||
|
||||
import gitbucket.core.view.GitBucketHtmlSerializer
|
||||
import org.specs2.mutable._
|
||||
|
||||
class GitBucketHtmlSerializerSpec extends Specification {
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
package view
|
||||
|
||||
import gitbucket.core.util.ControlUtil
|
||||
import gitbucket.core.view.Pagination
|
||||
import org.specs2.mutable._
|
||||
import util.ControlUtil._
|
||||
import ControlUtil._
|
||||
|
||||
class PaginationSpec extends Specification {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user