Skip to content

Commit

Permalink
HTS-1629: Updated mongo libraries (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
jackie1988 authored and AndyHWChung committed Mar 7, 2019
1 parent 2de4e4e commit 94c0654
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 10 deletions.
4 changes: 2 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ val dependencies = Seq(
"uk.gov.hmrc" %% "play-ui" % "7.31.0-play-25",
"uk.gov.hmrc" %% "bootstrap-play-25" % "4.8.0",
"org.mongodb.scala" %% "mongo-scala-driver" % "1.2.1",
"uk.gov.hmrc" %% "play-reactivemongo" % "6.2.0",
"uk.gov.hmrc" %% "simple-reactivemongo" % "7.12.0-play-25",
"uk.gov.hmrc" %% "play-whitelist-filter" % "2.0.0",
"com.github.kxbmap" %% "configs" % "0.4.4",
"org.typelevel" %% "cats-core" % "1.5.0",
Expand All @@ -28,7 +28,7 @@ def testDependencies(scope: String = "test") = Seq(
"com.typesafe.play" %% "play-test" % PlayVersion.current % scope,
"org.scalamock" %% "scalamock-scalatest-support" % "3.6.0" % scope,
"uk.gov.hmrc" %% "stub-data-generator" % "0.5.3" % scope,
"uk.gov.hmrc" %% "reactivemongo-test" % "3.1.0" % scope
"uk.gov.hmrc" %% "reactivemongo-test" % "4.8.0-play-25" % scope
)

lazy val plugins: Seq[Plugins] = Seq.empty
Expand Down
3 changes: 2 additions & 1 deletion conf/app.routes
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# microservice specific routes

GET / @uk.gov.hmrc.helptosavetestadminfrontend.controllers.HelpToSaveApiController.availableFunctions()
-> /dummy-pages dummyPages.Routes

POST /delete-emails @uk.gov.hmrc.helptosavetestadminfrontend.controllers.VerifiedEmailsController.deleteVerifiedEmails

Expand Down Expand Up @@ -29,4 +28,6 @@ GET /account @uk.gov.hmrc.helptosavetestadminfrontend.

GET /curl-result @uk.gov.hmrc.helptosavetestadminfrontend.controllers.HelpToSaveApiController.getCurlRequestIsPage(id: java.util.UUID)

GET /dummy-pages/account-homepage @uk.gov.hmrc.helptosavetestadminfrontend.controllers.DummyPagesController.accountHomepage

GET /dummy-pages/pay-in @uk.gov.hmrc.helptosavetestadminfrontend.controllers.DummyPagesController.payIn
4 changes: 0 additions & 4 deletions conf/dummyPages.routes

This file was deleted.

5 changes: 2 additions & 3 deletions test/repos/MongoTestSupport.scala
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import org.scalamock.scalatest.MockFactory
import play.api.libs.json.Json
import play.modules.reactivemongo.ReactiveMongoComponent
import reactivemongo.api.commands.{DefaultWriteResult, WriteError, WriteResult}
import reactivemongo.api.DefaultDB
import reactivemongo.bson.BSONObjectID
import uk.gov.hmrc.mongo.{MongoConnector, ReactiveRepository}

Expand All @@ -42,9 +41,9 @@ trait MongoTestSupport[Data, Repo <: ReactiveRepository[Data, BSONObjectID]] {

lazy val mongoStore: Repo = {
val connector = mock[MongoConnector]
val db = stub[DefaultDB]
(mockMongo.mongoConnector _).expects().returning(connector)
(connector.db _).expects().returning(() db)
// we are using null as the constructor of DefaultDB is private
(connector.db _).expects().returning(() null)
newMongoStore()
}

Expand Down

0 comments on commit 94c0654

Please sign in to comment.