Small fix for #147

This commit is contained in:
takezoe
2013-10-22 01:09:22 +09:00
parent 90ab882e8e
commit f3ad1a019d
2 changed files with 3 additions and 3 deletions

View File

@@ -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
}
}}

View File

@@ -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)){