Skip to content

Commit da6db35

Browse files
committed
Don’t filter out private products
1 parent 0683d96 commit da6db35

File tree

2 files changed

+3
-24
lines changed

2 files changed

+3
-24
lines changed

Modules/Sources/Storage/GRDB/Model/PersistedProduct.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,7 @@ public extension PersistedProduct {
108108
let excludedStatuses = [
109109
"trash",
110110
"draft",
111-
"pending",
112-
"private"
111+
"pending"
113112
]
114113

115114
return PersistedProduct

Modules/Tests/YosemiteTests/Storage/PersistedProductTests.swift

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -612,8 +612,8 @@ struct PersistedProductTests {
612612
#expect(products.first?.statusKey == "publish")
613613
}
614614

615-
@Test("posProductsRequest filters out draft, pending, and private products")
616-
func posProductsRequest_filters_out_draft_pending_private_products() throws {
615+
@Test("posProductsRequest filters out draft, and pending products")
616+
func posProductsRequest_filters_out_draft_pending_products() throws {
617617
// Given
618618
let grdbManager = try GRDBManager()
619619
let db = grdbManager.databaseConnection
@@ -681,26 +681,6 @@ struct PersistedProductTests {
681681
statusKey: "pending"
682682
)
683683
try pendingProduct.insert(db)
684-
685-
// Insert private product (should be filtered out)
686-
let privateProduct = PersistedProduct(
687-
id: 4,
688-
siteID: 1,
689-
name: "Private Product",
690-
productTypeKey: "simple",
691-
fullDescription: nil,
692-
shortDescription: nil,
693-
sku: nil,
694-
globalUniqueID: nil,
695-
price: "40.00",
696-
downloadable: false,
697-
parentID: 0,
698-
manageStock: false,
699-
stockQuantity: nil,
700-
stockStatusKey: "instock",
701-
statusKey: "private"
702-
)
703-
try privateProduct.insert(db)
704684
}
705685

706686
// When

0 commit comments

Comments
 (0)