Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions Firestore/Swift/Tests/Integration/PipelineSubqueryTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -783,4 +783,22 @@ class PipelineSubqueryTests: FSTIntegrationTestCase {
)
}
}

func testUnionWithSubqueryThrows() async throws {
let collRef = collectionRef()
let db = collRef.firestore

do {
_ = try await db.pipeline()
.collection(collRef.path)
.union(with: Subcollection("subcollection"))
.execute()
XCTFail("Should throw error")
} catch {
XCTAssertTrue(
error.localizedDescription.contains("Union only supports combining root pipelines"),
error.localizedDescription
)
}
}
}
Loading