Skip to content

Commit f23edea

Browse files
committed
Update unit test plugin setup to properly set networkActivated and active from status
1 parent 05dd99a commit f23edea

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

WooCommerce/WooCommerceTests/ViewRelated/CardPresentPayments/CardPresentPaymentsOnboardingUseCaseTests.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -358,15 +358,17 @@ private extension CardPresentPaymentsOnboardingUseCaseTests {
358358
// MARK: - Plugin helpers
359359
private extension CardPresentPaymentsOnboardingUseCaseTests {
360360
func setupPlugin(status: SitePluginStatusEnum, version: PluginVersion) {
361+
let active = status == .active || status == .networkActive
362+
let networkActivated = status == .networkActive
361363
let plugin = SystemPlugin
362364
.fake()
363365
.copy(
364366
siteID: sampleSiteID,
365367
plugin: "woocommerce-payments",
366-
// status: status, // TODO fix in #5269
367368
name: "WooCommerce Payments",
368369
version: version.rawValue,
369-
networkActivated: true // TODO remove in #5269
370+
networkActivated: networkActivated,
371+
active: active
370372
)
371373
storageManager.insertSampleSystemPlugin(readOnlySystemPlugin: plugin)
372374
}

0 commit comments

Comments
 (0)