dashlane-csv-importer: Set month on import (#4284)
This commit is contained in:
parent
72ec05a3e6
commit
6d2a2aa852
|
@ -79,8 +79,8 @@ describe("Dashlane CSV Importer", () => {
|
||||||
expect(cipher2.card.cardholderName).toBe("John Doe");
|
expect(cipher2.card.cardholderName).toBe("John Doe");
|
||||||
expect(cipher2.card.number).toBe("41111111111111111");
|
expect(cipher2.card.number).toBe("41111111111111111");
|
||||||
expect(cipher2.card.code).toBe("123");
|
expect(cipher2.card.code).toBe("123");
|
||||||
expect(cipher2.card.expMonth).toBe("01");
|
expect(cipher2.card.expMonth).toBe("1");
|
||||||
expect(cipher2.card.expYear).toBe("23");
|
expect(cipher2.card.expYear).toBe("2023");
|
||||||
|
|
||||||
expect(cipher2.fields.length).toBe(2);
|
expect(cipher2.fields.length).toBe(2);
|
||||||
|
|
||||||
|
|
|
@ -137,8 +137,7 @@ export class DashlaneCsvImporter extends BaseImporter implements Importer {
|
||||||
cipher.card.number = row.cc_number;
|
cipher.card.number = row.cc_number;
|
||||||
cipher.card.brand = this.getCardBrand(cipher.card.number);
|
cipher.card.brand = this.getCardBrand(cipher.card.number);
|
||||||
cipher.card.code = row.code;
|
cipher.card.code = row.code;
|
||||||
cipher.card.expMonth = row.expiration_month;
|
this.setCardExpiration(cipher, `${row.expiration_month}/${row.expiration_year}`);
|
||||||
cipher.card.expYear = row.expiration_year.substring(2, 4);
|
|
||||||
|
|
||||||
// If you add more mapped fields please extend this
|
// If you add more mapped fields please extend this
|
||||||
mappedValues = [
|
mappedValues = [
|
||||||
|
|
Loading…
Reference in New Issue