fix test's inheritances

This commit is contained in:
KOUNOIKE
2018-10-08 17:06:57 +09:00
parent e961f54405
commit 78c7a4be0b
4 changed files with 13 additions and 6 deletions

View File

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

View 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)

View File

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

View File

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