Skip to content

Commit de9d5e2

Browse files
Add regression test for project-chip#23357
1 parent a2f0a17 commit de9d5e2

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/darwin/Framework/CHIPTests/MTRSetupPayloadTests.m

+7
Original file line numberDiff line numberDiff line change
@@ -275,4 +275,11 @@ - (void)test31129 // https://github.com/project-chip/connectedhomeip/issues/3112
275275
XCTAssert(payload.manualEntryCode != nil ||[payload qrCodeString:NULL] != nil);
276276
}
277277

278+
- (void)test23357 // https://github.com/project-chip/connectedhomeip/pull/23357
279+
{
280+
// Should return nil for invalid payloads (e.g. invalid passcode "@11111111")
281+
XCTAssertNil([MTRSetupPayload setupPayloadWithOnboardingPayload:@"MT:-24J042C00KMSP0Z800" error:NULL]);
282+
XCTAssertNil([MTRSetupPayload setupPayloadWithOnboardingPayload:@"35191106788" error:NULL]);
283+
}
284+
278285
@end

0 commit comments

Comments
 (0)