mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-04 20:45:58 +01:00
fix test's inheritances
This commit is contained in:
@@ -14,7 +14,7 @@ import java.io.File
|
||||
class MergeServiceSpec extends FunSpec {
|
||||
val service = new MergeService with AccountService with ActivityService with IssuesService with LabelsService
|
||||
with MilestonesService with RepositoryService with PrioritiesService with PullRequestService with CommitsService
|
||||
with WebHookPullRequestService {}
|
||||
with WebHookPullRequestService with WebHookPullRequestReviewCommentService {}
|
||||
val branch = "master"
|
||||
val issueId = 10
|
||||
def initRepository(owner: String, name: String): File = {
|
||||
|
||||
@@ -9,11 +9,15 @@ class PullRequestServiceSpec
|
||||
with PullRequestService
|
||||
with IssuesService
|
||||
with AccountService
|
||||
with ActivityService
|
||||
with RepositoryService
|
||||
with CommitsService
|
||||
with LabelsService
|
||||
with MilestonesService
|
||||
with PrioritiesService {
|
||||
with PrioritiesService
|
||||
with WebHookService
|
||||
with WebHookPullRequestService
|
||||
with WebHookPullRequestReviewCommentService {
|
||||
|
||||
def swap(r: (Issue, PullRequest)) = (r._2 -> r._1)
|
||||
|
||||
|
||||
@@ -43,8 +43,10 @@ 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 CommitsService with CommitStatusService with LabelsService with MilestonesService with PrioritiesService() {}
|
||||
lazy val dummyService = new RepositoryService with AccountService with ActivityService with IssuesService
|
||||
with PullRequestService with CommitsService with CommitStatusService with LabelsService with MilestonesService
|
||||
with PrioritiesService with WebHookService with WebHookPullRequestService
|
||||
with WebHookPullRequestReviewCommentService {}
|
||||
|
||||
def generateNewUserWithDBRepository(userName: String, repositoryName: String)(implicit s: Session): Account = {
|
||||
val ac = AccountService.getAccountByUserName(userName).getOrElse(generateNewAccount(userName))
|
||||
|
||||
@@ -5,8 +5,9 @@ import org.scalatest.FunSuite
|
||||
import gitbucket.core.model.WebHookContentType
|
||||
|
||||
class WebHookServiceSpec extends FunSuite with ServiceSpecBase {
|
||||
lazy val service = new WebHookPullRequestService with AccountService with RepositoryService with PullRequestService
|
||||
with IssuesService with CommitsService with LabelsService with MilestonesService with PrioritiesService
|
||||
lazy val service = new WebHookPullRequestService with AccountService with ActivityService with RepositoryService
|
||||
with PullRequestService with IssuesService with CommitsService with LabelsService with MilestonesService
|
||||
with PrioritiesService with WebHookPullRequestReviewCommentService
|
||||
|
||||
test("WebHookPullRequestService.getPullRequestsByRequestForWebhook") {
|
||||
withTestDB { implicit session =>
|
||||
|
||||
Reference in New Issue
Block a user