@@ -345,13 +345,13 @@ class AWSDataStoreLocalStoreTests: LocalStoreIntegrationTestBase {
345
345
346
346
let postsContaining1InTitle = try await Amplify . DataStore. query (
347
347
Post . self,
348
- where: Post . keys. title. contains ( " 1 " )
348
+ where: Post . keys. title. contains ( " _1_ " )
349
349
)
350
350
XCTAssertEqual ( postsContaining1InTitle. count, 1 )
351
351
352
352
let postsNotContaining1InTitle = try await Amplify . DataStore. query (
353
353
Post . self,
354
- where: Post . keys. title. notContains ( " 1 " )
354
+ where: Post . keys. title. notContains ( " _1_ " )
355
355
)
356
356
XCTAssertEqual (
357
357
posts. count - postsContaining1InTitle. count,
@@ -360,7 +360,7 @@ class AWSDataStoreLocalStoreTests: LocalStoreIntegrationTestBase {
360
360
361
361
XCTAssertTrue (
362
362
postsNotContaining1InTitle. filter (
363
- { $0. title. contains ( " 1 " ) }
363
+ { $0. title. contains ( " _1_ " ) }
364
364
) . isEmpty
365
365
)
366
366
}
@@ -423,7 +423,7 @@ class AWSDataStoreLocalStoreTests: LocalStoreIntegrationTestBase {
423
423
let randomTitleNumber = String ( Int . random ( in: 0 ..< numberOfPosts) )
424
424
425
425
let postWithDuplicateTitleAndDifferentStatus = Post (
426
- title: " title_ \( randomTitleNumber) " ,
426
+ title: " title_ \( randomTitleNumber) _ " ,
427
427
content: " content " ,
428
428
createdAt: . now( ) ,
429
429
status: . published
@@ -433,7 +433,7 @@ class AWSDataStoreLocalStoreTests: LocalStoreIntegrationTestBase {
433
433
434
434
let postsContainingRandomTitleNumber = try await Amplify . DataStore. query (
435
435
Post . self,
436
- where: Post . keys. title. contains ( randomTitleNumber)
436
+ where: Post . keys. title. contains ( " _ \( randomTitleNumber) _ " )
437
437
)
438
438
439
439
XCTAssertEqual ( postsContainingRandomTitleNumber. count, 2 )
@@ -455,7 +455,7 @@ class AWSDataStoreLocalStoreTests: LocalStoreIntegrationTestBase {
455
455
456
456
let postsContainingRandomTitleNumberAndNotContainingDraftStatus = try await Amplify . DataStore. query (
457
457
Post . self,
458
- where: Post . keys. title. contains ( randomTitleNumber)
458
+ where: Post . keys. title. contains ( " _ \( randomTitleNumber) _ " )
459
459
&& Post . keys. status. notContains ( PostStatus . published. rawValue)
460
460
)
461
461
@@ -466,7 +466,7 @@ class AWSDataStoreLocalStoreTests: LocalStoreIntegrationTestBase {
466
466
467
467
XCTAssertEqual (
468
468
postsContainingRandomTitleNumberAndNotContainingDraftStatus [ 0 ] . title,
469
- " title_ \( randomTitleNumber) "
469
+ " title_ \( randomTitleNumber) _ "
470
470
)
471
471
472
472
XCTAssertNotEqual (
@@ -486,12 +486,12 @@ class AWSDataStoreLocalStoreTests: LocalStoreIntegrationTestBase {
486
486
487
487
try await Amplify . DataStore. delete (
488
488
Post . self,
489
- where: Post . keys. title. notContains ( " 1 " )
489
+ where: Post . keys. title. notContains ( " _1_ " )
490
490
)
491
491
492
492
let postsIncluding1InTitle = try await Amplify . DataStore. query ( Post . self)
493
493
XCTAssertEqual ( postsIncluding1InTitle. count, 1 )
494
- XCTAssertEqual ( postsIncluding1InTitle [ 0 ] . title, " title_1 " )
494
+ XCTAssertEqual ( postsIncluding1InTitle [ 0 ] . title, " title_1_ " )
495
495
}
496
496
497
497
@@ -505,9 +505,9 @@ class AWSDataStoreLocalStoreTests: LocalStoreIntegrationTestBase {
505
505
. init( title: title, content: content, createdAt: . now( ) )
506
506
}
507
507
508
- let post1 = post ( title: " title_1 " , content: " a " )
509
- let post2 = post ( title: " title_1 " , content: " b " )
510
- let post3 = post ( title: " title_3 " , content: " c " )
508
+ let post1 = post ( title: " title_1_ " , content: " a " )
509
+ let post2 = post ( title: " title_1_ " , content: " b " )
510
+ let post3 = post ( title: " title_3_ " , content: " c " )
511
511
512
512
_ = try await Amplify . DataStore. save ( post1)
513
513
_ = try await Amplify . DataStore. save ( post2)
@@ -518,7 +518,7 @@ class AWSDataStoreLocalStoreTests: LocalStoreIntegrationTestBase {
518
518
519
519
try await Amplify . DataStore. delete (
520
520
Post . self,
521
- where: Post . keys. title. notContains ( " 1 " )
521
+ where: Post . keys. title. notContains ( " _1_ " )
522
522
|| Post . keys. content. notContains ( " a " )
523
523
)
524
524
@@ -645,7 +645,7 @@ class AWSDataStoreLocalStoreTests: LocalStoreIntegrationTestBase {
645
645
func setUpLocalStore( numberOfPosts: Int ) async throws -> [ Post ] {
646
646
let posts = ( 0 ..< numberOfPosts) . map {
647
647
Post (
648
- title: " title_ \( $0) " ,
648
+ title: " title_ \( $0) _ " ,
649
649
content: " content " ,
650
650
createdAt: . now( ) ,
651
651
rating: Double ( Int . random ( in: 0 ... 5 ) ) ,
0 commit comments