Skip to content

Commit

Permalink
Removing count checks
Browse files Browse the repository at this point in the history
  • Loading branch information
Flavian Alexandru committed May 6, 2016
1 parent cf13b10 commit e3975b7
Showing 1 changed file with 4 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,23 +63,16 @@ class InsertCasTest extends PhantomSuite {
store <- insertion.future()
one <- TestDatabase.primitives.select.where(_.pkey eqs row.pkey).one
multi <- TestDatabase.primitives.select.where(_.pkey eqs row.pkey).fetch()
count <- TestDatabase.primitives.select.count.one()
} yield (one, count, multi)
} yield (one, multi)

whenReady(chain) {
case (res1, res2, res3) => {
case (res1, res3) => {
info("The one query should return a record")
res1 shouldBe defined

info("And the record should equal the inserted record")
res1.value shouldEqual row

info("And the count should be present")
res2 shouldBe defined

info("And it should be one after a single insertion.")
res2.value shouldEqual 1L

info("And only one record should be retrieved from a range fetch")
res3 should have size 1
}
Expand All @@ -105,23 +98,16 @@ class InsertCasTest extends PhantomSuite {
store <- insertion.future()
one <- TestDatabase.primitives.select.where(_.pkey eqs row.pkey).one
multi <- TestDatabase.primitives.select.where(_.pkey eqs row.pkey).fetch()
count <- TestDatabase.primitives.select.count.one()
} yield (one, count, multi)
} yield (one, multi)

whenReady(chain) {
case (res1, res2, res3) => {
case (res1, res3) => {
info("The one query should return a record")
res1 shouldBe defined

info("And the record should equal the inserted record")
res1.value shouldEqual row

info("And the count should be present")
res2 shouldBe defined

info("And it should be one after a single insertion.")
res2.value shouldEqual 1L

info("And only one record should be retrieved from a range fetch")
res3 should have size 1
}
Expand Down

0 comments on commit e3975b7

Please sign in to comment.