Skip to content

Commit

Permalink
Update SwiftUI sync tests for changes to the flexible sync API
Browse files Browse the repository at this point in the history
  • Loading branch information
tgoyne committed Jun 30, 2022
1 parent e0d0398 commit 8719371
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Realm/Tests/SwiftUISyncTestHost/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ struct AsyncOpenFlexibleSyncView: View {
Task {
do {
let subs = realm.subscriptions
try await subs.write {
try await subs.update {
subs.append(QuerySubscription<SwiftPerson>(name: "person_age") {
$0.age > 5 && $0.firstName == ProcessInfo.processInfo.environment["firstName"]!
})
Expand Down Expand Up @@ -444,7 +444,7 @@ struct AutoOpenFlexibleSyncView: View {
Task {
do {
let subs = realm.subscriptions
try await subs.write {
try await subs.update {
subs.append(QuerySubscription<SwiftPerson>(name: "person_age") {
$0.age > 2 && $0.firstName == ProcessInfo.processInfo.environment["firstName"]!
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ extension SwiftUISyncTestHostUITests {
let realm = try Realm(configuration: config)
let subs = realm.subscriptions
let ex = expectation(description: "state change complete")
subs.write({
subs.update({
subs.append(QuerySubscription<SwiftPerson>(name: "person_age", where: "TRUEPREDICATE"))
}, onComplete: { error in
if error == nil {
Expand Down

0 comments on commit 8719371

Please sign in to comment.