@@ -1545,7 +1545,8 @@ describe('Client Side Encryption Prose Tests', metadata, function () {
1545
1545
// collection with the filter { "encryptedIndexed": <findPayload> }.
1546
1546
// Assert one document is returned containing the field
1547
1547
// { "encryptedIndexed": "encrypted indexed value" }.
1548
- const result = await encryptedClient . findOne ( { encryptedIndexed : findPayload } ) ;
1548
+ const collection = encryptedClient . db ( 'db' ) . collection ( 'explicit_encryption' ) ;
1549
+ const result = await collection . findOne ( { encryptedIndexed : findPayload } ) ;
1549
1550
expect ( result . encryptedIndexed ) . to . equal ( 'encrypted indexed value' ) ;
1550
1551
} ) ;
1551
1552
} ) ;
@@ -1613,7 +1614,8 @@ describe('Client Side Encryption Prose Tests', metadata, function () {
1613
1614
// Assert less than 10 documents are returned. 0 documents may be returned.
1614
1615
// Assert each returned document contains the field
1615
1616
// { "encryptedIndexed": "encrypted indexed value" }.
1616
- const result = await encryptedClient . find ( { encryptedIndexed : findPayload } ) . toArray ( ) ;
1617
+ const collection = encryptedClient . db ( 'db' ) . collection ( 'explicit_encryption' ) ;
1618
+ const result = await collection . find ( { encryptedIndexed : findPayload } ) . toArray ( ) ;
1617
1619
expect ( result . length ) . to . be . below ( 10 ) ;
1618
1620
for ( const doc of result ) {
1619
1621
expect ( doc . encryptedIndexed ) . to . equal ( 'encrypted indexed value' ) ;
@@ -1625,7 +1627,8 @@ describe('Client Side Encryption Prose Tests', metadata, function () {
1625
1627
// collection with the filter { "encryptedIndexed": <findPayload2> }.
1626
1628
// Assert 10 documents are returned. Assert each returned document contains the
1627
1629
// field { "encryptedIndexed": "encrypted indexed value" }.
1628
- const result = await encryptedClient . find ( { encryptedIndexed : findPayload2 } ) . toArray ( ) ;
1630
+ const collection = encryptedClient . db ( 'db' ) . collection ( 'explicit_encryption' ) ;
1631
+ const result = await collection . find ( { encryptedIndexed : findPayload2 } ) . toArray ( ) ;
1629
1632
expect ( result . length ) . to . equal ( 10 ) ;
1630
1633
for ( const doc of result ) {
1631
1634
expect ( doc . encryptedIndexed ) . to . equal ( 'encrypted indexed value' ) ;
@@ -1660,7 +1663,8 @@ describe('Client Side Encryption Prose Tests', metadata, function () {
1660
1663
// collection with the filter { "_id": 1 }.
1661
1664
// Assert one document is returned containing the field
1662
1665
// { "encryptedUnindexed": "encrypted unindexed value" }.
1663
- const result = await encryptedClient . findOne ( { _id : 1 } ) ;
1666
+ const collection = encryptedClient . db ( 'db' ) . collection ( 'explicit_encryption' ) ;
1667
+ const result = await collection . findOne ( { _id : 1 } ) ;
1664
1668
expect ( result . encryptedIndexed ) . to . equal ( 'encrypted unindexed value' ) ;
1665
1669
} ) ;
1666
1670
} ) ;
@@ -1699,7 +1703,7 @@ describe('Client Side Encryption Prose Tests', metadata, function () {
1699
1703
// algorithm: "Unindexed",
1700
1704
// }
1701
1705
// Store the result in payload.
1702
- payload = await clientEncryption . encrypt ( 'encrypted indexed value' , {
1706
+ payload = await clientEncryption . encrypt ( 'encrypted unindexed value' , {
1703
1707
keyId : key1Id ,
1704
1708
algorithm : 'Unindexed'
1705
1709
} ) ;
0 commit comments