Skip to content

Commit 447761b

Browse files
Add a unit test to test invalid Step and Flow.
1 parent 82f9d94 commit 447761b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

WooCommerce/WooCommerceTests/Model/CustomHelpCenterContentTests.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,11 @@ final class CustomHelpCenterContentTests: XCTestCase {
3636
XCTAssertEqual(sut.trackingProperties[CustomHelpCenterContent.Key.flow.rawValue], flow.rawValue)
3737
XCTAssertEqual(sut.trackingProperties[CustomHelpCenterContent.Key.url.rawValue], helpContentURL.absoluteString)
3838
}
39+
40+
func test_init_using_invalid_step_and_flow_returns_nil() {
41+
let step: AuthenticatorAnalyticsTracker.Step = .magicLinkRequested
42+
let flow: AuthenticatorAnalyticsTracker.Flow = .prologue
43+
44+
XCTAssertNil(CustomHelpCenterContent(step: step, flow: flow))
45+
}
3946
}

0 commit comments

Comments
 (0)