mirror of
https://github.com/bitwarden/browser
synced 2025-12-15 15:53:27 +00:00
[PM-2256] Fix importer parsing credit card expiry year (#5444)
* Fix importer parsing credit card expiry year When importing a credit card from Enpass it was found that with a 4 digit expiry year was prefixed with '20', stored at 11/202025 instead of 11/2025. Fixed typo that checked length of month instead of year which incorrectly added prefix. * Refactor setCardExpiration to use RegExp
This commit is contained in:
@@ -77,7 +77,7 @@ function expectCreditCard(cipher: CipherView) {
|
||||
expect(cipher.card.number).toBe("4024007103939509");
|
||||
expect(cipher.card.code).toBe("123");
|
||||
expect(cipher.card.expMonth).toBe("1");
|
||||
expect(cipher.card.expYear).toBe("22");
|
||||
expect(cipher.card.expYear).toBe("2022");
|
||||
}
|
||||
|
||||
function expectIdentity(cipher: CipherView) {
|
||||
|
||||
Reference in New Issue
Block a user