Skip to content

Commit

Permalink
cover the failing scenario with a test
Browse files Browse the repository at this point in the history
  • Loading branch information
colintremblay-okta authored and mikenachbaur-okta committed Feb 7, 2024
1 parent 5a858e0 commit f1895cc
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion Tests/AuthFoundationTests/OIDCLegacyMigratorTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,22 @@ final class OIDCLegacyMigratorTests: XCTestCase {
]
] as CFArray)
XCTAssertTrue(migrator.needsMigration)

// Test that a clientId match counts as a match
keychain.expect(noErr, result: [
[
"svce": "",
"acct": "clientId",
"class": "genp",
"cdat": Date(),
"mdat": Date(),
"pdmn": "ak",
"agrp": "com.okta.sample.app"
]
] as CFArray)
XCTAssertTrue(migrator.needsMigration)
}

func testMigrate() throws {
let notificationRecorder = NotificationRecorder(observing: [ .credentialMigrated ])

Expand Down

0 comments on commit f1895cc

Please sign in to comment.