mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-06 21:45:50 +01:00
Small fix for #147
This commit is contained in:
@@ -3,14 +3,14 @@ package service
|
||||
import org.specs2.mutable.Specification
|
||||
import java.util.Date
|
||||
|
||||
class AccountServiceSpec extends Specification with SpecBase {
|
||||
class AccountServiceServiceSpec extends Specification with ServiceSpecBase {
|
||||
|
||||
"AccountService" should {
|
||||
val RootMailAddress = "root@localhost"
|
||||
|
||||
"getAllUsers" in { withTestDB{
|
||||
AccountService.getAllUsers must be like{
|
||||
case List(model.Account("root", RootMailAddress, _, true, _, _, _, None, None, false)) => ok
|
||||
case List(model.Account("root", "root", RootMailAddress, _, true, _, _, _, None, None, false)) => ok
|
||||
}
|
||||
}}
|
||||
|
||||
@@ -7,7 +7,7 @@ import org.apache.commons.io.FileUtils
|
||||
import scala.util.Random
|
||||
import java.io.File
|
||||
|
||||
trait SpecBase {
|
||||
trait ServiceSpecBase {
|
||||
|
||||
def withTestDB[A](action: => A): A = {
|
||||
util.FileUtil.withTmpDir(new File(FileUtils.getTempDirectory(), Random.alphanumeric.take(10).mkString)){
|
||||
Reference in New Issue
Block a user