Add tests for alpha BT values

- Update deps
- Update release notes for v3.1
This commit is contained in:
2024-06-05 21:43:03 -04:00
parent 1707d3ce63
commit d7c8cae0c7
10 changed files with 43 additions and 8 deletions

View File

@@ -15,7 +15,8 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Expecto" Version="10.1.0" />
<PackageReference Include="Expecto" Version="10.2.1" />
<PackageReference Update="FSharp.Core" Version="8.0.300" />
</ItemGroup>
<ItemGroup>

View File

@@ -488,13 +488,20 @@ let integrationTests =
let! theCount = Count.all PostgresDb.TableName
Expect.equal theCount 5 "There should have been 5 matching documents"
}
testTask "byField succeeds" {
testTask "byField succeeds for numeric range" {
use db = PostgresDb.BuildDb()
do! loadDocs ()
let! theCount = Count.byField PostgresDb.TableName (Field.BT "NumValue" 10 20)
Expect.equal theCount 3 "There should have been 3 matching documents"
}
testTask "byField succeeds for non-numeric range" {
use db = PostgresDb.BuildDb()
do! loadDocs ()
let! theCount = Count.byField PostgresDb.TableName (Field.BT "Value" "aardvark" "apple")
Expect.equal theCount 1 "There should have been 1 matching document"
}
testTask "byContains succeeds" {
use db = PostgresDb.BuildDb()
do! loadDocs ()

View File

@@ -381,13 +381,20 @@ let integrationTests =
let! theCount = Count.all SqliteDb.TableName
Expect.equal theCount 5L "There should have been 5 matching documents"
}
testTask "byField succeeds" {
testTask "byField succeeds for a numeric range" {
use! db = SqliteDb.BuildDb()
do! loadDocs ()
let! theCount = Count.byField SqliteDb.TableName (Field.BT "NumValue" 10 20)
Expect.equal theCount 3L "There should have been 3 matching documents"
}
testTask "byField succeeds for a non-numeric range" {
use! db = SqliteDb.BuildDb()
do! loadDocs ()
let! theCount = Count.byField SqliteDb.TableName (Field.BT "Value" "aardvark" "apple")
Expect.equal theCount 1L "There should have been 1 matching document"
}
]
testList "Exists" [
testList "byId" [