mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-07 22:15:51 +01:00
Fix test case
This commit is contained in:
@@ -2,7 +2,9 @@ package gitbucket.core.service
|
||||
|
||||
import gitbucket.core.model._
|
||||
import org.scalatest.FunSuite
|
||||
|
||||
import gitbucket.core.model.Profile._
|
||||
import profile._
|
||||
import profile.blockingApi._
|
||||
|
||||
class AccessTokenServiceSpec extends FunSuite with ServiceSpecBase {
|
||||
|
||||
@@ -66,8 +68,7 @@ class AccessTokenServiceSpec extends FunSuite with ServiceSpecBase {
|
||||
test("when update Account.userName then AccessToken.userName changed") { withTestDB { implicit session =>
|
||||
val user2 = generateNewAccount("user2")
|
||||
val (id, token) = AccessTokenService.generateAccessToken("user2", "note")
|
||||
import gitbucket.core.model.Profile._
|
||||
import profile.simple._
|
||||
|
||||
Accounts.filter(_.userName === "user2".bind).map(_.userName).update("user3")
|
||||
|
||||
assert(AccessTokenService.getAccountByAccessToken(token) match {
|
||||
|
||||
@@ -2,7 +2,8 @@ package gitbucket.core.service
|
||||
|
||||
import gitbucket.core.model._
|
||||
import gitbucket.core.model.Profile._
|
||||
import profile.simple._
|
||||
import profile._
|
||||
import profile.blockingApi._
|
||||
import org.scalatest.FunSuite
|
||||
|
||||
|
||||
|
||||
@@ -9,7 +9,10 @@ class IssuesServiceSpec extends FunSuite with ServiceSpecBase {
|
||||
test("getCommitStatues") { withTestDB { implicit session =>
|
||||
val user1 = generateNewUserWithDBRepository("user1","repo1")
|
||||
|
||||
def getCommitStatues = dummyService.getCommitStatues(List(("user1","repo1",1),("user1","repo1",2)))
|
||||
def getCommitStatues = List(
|
||||
dummyService.getCommitStatues("user1","repo1",1),
|
||||
dummyService.getCommitStatues("user1","repo1",2)
|
||||
)
|
||||
|
||||
assert(getCommitStatues == Map.empty)
|
||||
|
||||
|
||||
@@ -8,7 +8,8 @@ import gitbucket.core.model.Profile._
|
||||
import io.github.gitbucket.solidbase.Solidbase
|
||||
import liquibase.database.core.H2Database
|
||||
import liquibase.database.jvm.JdbcConnection
|
||||
import profile.simple._
|
||||
import profile._
|
||||
import profile.blockingApi._
|
||||
import scalaz._
|
||||
import Scalaz._
|
||||
|
||||
|
||||
Reference in New Issue
Block a user