File tree Expand file tree Collapse file tree 5 files changed +22
-12
lines changed
src/test/scala/com/sfxcode/nosql/mongo/dao Expand file tree Collapse file tree 5 files changed +22
-12
lines changed Original file line number Diff line number Diff line change 1- version = 2.3 . 2
1+ version = 2.4 . 0
22
33style = defaultWithAlign
44project.git = true
Original file line number Diff line number Diff line change 22
33## Versions
44
5+ ### 2.0.2
6+ * mongo-scala-driver 4.0.3
7+ * dependency updates
8+
59### 2.0.1
610* Mongo Java Server Support
711* LocalServer, ServerConfig added
Original file line number Diff line number Diff line change @@ -47,25 +47,25 @@ resolvers += "Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repos
4747
4848// Test
4949
50- libraryDependencies += " org.specs2" %% " specs2-core" % " 4.9.3 " % Test
50+ libraryDependencies += " org.specs2" %% " specs2-core" % " 4.9.4 " % Test
5151
5252libraryDependencies += " ch.qos.logback" % " logback-classic" % " 1.2.3" % Test
5353
54- libraryDependencies += " joda-time" % " joda-time" % " 2.10.5 " % Test
54+ libraryDependencies += " joda-time" % " joda-time" % " 2.10.6 " % Test
5555
56- libraryDependencies += " org.json4s" %% " json4s-native" % " 3.6.7 " % Test
56+ libraryDependencies += " org.json4s" %% " json4s-native" % " 3.6.8 " % Test
5757
58- libraryDependencies += " org.mongodb.scala" %% " mongo-scala-driver" % " 4.0.2 "
58+ libraryDependencies += " org.mongodb.scala" %% " mongo-scala-driver" % " 4.0.3 "
5959
60- libraryDependencies += " org.xerial.snappy" % " snappy-java" % " 1.1.7.3 " % Provided
60+ libraryDependencies += " org.xerial.snappy" % " snappy-java" % " 1.1.7.5 " % Provided
6161
62- libraryDependencies += " com.github.luben" % " zstd-jni" % " 1.4.4-9 " % Provided
62+ libraryDependencies += " com.github.luben" % " zstd-jni" % " 1.4.4-11 " % Provided
6363
64- libraryDependencies += " de.bwaldvogel" % " mongo-java-server" % " 1.28.0 " % Provided
64+ libraryDependencies += " de.bwaldvogel" % " mongo-java-server" % " 1.29.1 " % Provided
6565
66- libraryDependencies += " de.bwaldvogel" % " mongo-java-server-h2-backend" % " 1.28.0 " % Provided
66+ libraryDependencies += " de.bwaldvogel" % " mongo-java-server-h2-backend" % " 1.29.1 " % Provided
6767
68- libraryDependencies += " com.github.pathikrit" %% " better-files" % " 3.8.0 "
68+ libraryDependencies += " com.github.pathikrit" %% " better-files" % " 3.9.1 "
6969
7070libraryDependencies += " com.typesafe" % " config" % " 1.4.0"
7171
Original file line number Diff line number Diff line change 11addSbtPlugin(" org.scalastyle" %% " scalastyle-sbt-plugin" % " 1.0.0" )
22
3- addSbtPlugin(" org.scalameta" % " sbt-scalafmt" % " 2.3.2 " )
3+ addSbtPlugin(" org.scalameta" % " sbt-scalafmt" % " 2.4.0 " )
44
55addSbtPlugin(" org.scoverage" % " sbt-scoverage" % " 1.6.1" )
66
77addSbtPlugin(" com.eed3si9n" % " sbt-buildinfo" % " 0.9.0" )
88
99// updates, release
1010
11- addSbtPlugin(" com.timushev.sbt" % " sbt-updates" % " 0.5.0 " )
11+ addSbtPlugin(" com.timushev.sbt" % " sbt-updates" % " 0.5.1 " )
1212
1313addSbtPlugin(" org.foundweekends" % " sbt-bintray" % " 0.5.6" )
1414
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import org.mongodb.scala.model.Filters.and
1313import org .mongodb .scala .model .Projections
1414import org .specs2 .mutable .Specification
1515import org .specs2 .specification .BeforeAll
16+ import org .mongodb .scala .model .Updates ._
1617
1718class BookDAOSpec extends Specification with BeforeAll {
1819 val DateFormat = new SimpleDateFormat (" yyyy-MM-dd" )
@@ -58,5 +59,10 @@ class BookDAOSpec extends Specification with BeforeAll {
5859 val list = BookDAO .Raw .findAggregated(pipeline).resultList().map(doc => doc.asPlainMap)
5960 list must haveSize(58 )
6061 }
62+
63+ " update one" in {
64+ BookDAO .updateOne(Map (" _id" -> 10 ), set(" title" , " new title" )).result()
65+ BookDAO .find(" _id" , 10 ).result().title mustEqual " new title"
66+ }
6167 }
6268}
You can’t perform that action at this time.
0 commit comments