mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-02 03:26:06 +01:00
(refs #1348)Fix testcase
This commit is contained in:
@@ -4,7 +4,7 @@ import gitbucket.core.model._
|
||||
import org.scalatest.FunSpec
|
||||
|
||||
class PullRequestServiceSpec extends FunSpec with ServiceSpecBase
|
||||
with PullRequestService with IssuesService with AccountService with RepositoryService {
|
||||
with PullRequestService with IssuesService with AccountService with RepositoryService with CommitsService {
|
||||
|
||||
def swap(r: (Issue, PullRequest)) = (r._2 -> r._1)
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ trait ServiceSpecBase {
|
||||
def user(name:String)(implicit s:Session):Account = AccountService.getAccountByUserName(name).get
|
||||
|
||||
lazy val dummyService = new RepositoryService with AccountService with IssuesService with PullRequestService
|
||||
with CommitStatusService with LabelsService (){}
|
||||
with CommitsService with CommitStatusService with LabelsService (){}
|
||||
|
||||
def generateNewUserWithDBRepository(userName:String, repositoryName:String)(implicit s:Session):Account = {
|
||||
val ac = AccountService.getAccountByUserName(userName).getOrElse(generateNewAccount(userName))
|
||||
|
||||
@@ -6,7 +6,7 @@ import gitbucket.core.model.WebHookContentType
|
||||
|
||||
|
||||
class WebHookServiceSpec extends FunSuite with ServiceSpecBase {
|
||||
lazy val service = new WebHookPullRequestService with AccountService with RepositoryService with PullRequestService with IssuesService
|
||||
lazy val service = new WebHookPullRequestService with AccountService with RepositoryService with PullRequestService with IssuesService with CommitsService
|
||||
|
||||
test("WebHookPullRequestService.getPullRequestsByRequestForWebhook") { withTestDB { implicit session =>
|
||||
val user1 = generateNewUserWithDBRepository("user1","repo1")
|
||||
|
||||
Reference in New Issue
Block a user